This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v3 0/2] Fix several mix up between octets and bytes in ELF program headers


On Sun, Feb 16, 2020 at 08:37:43PM +0100, Christian Eggers wrote:
> But for the ELF file, every program handling it must know which information is
> in octets or in bytes. For luck, the sizes are already in octets, otherwise I
> had already trouble with external software. But probably everything should be
> stored in octets, at least this should resolve the trouble I already have with
> my external debugger. This debugger has only one symbol space for ARM and
> SDMA. Having symbols (and debug line info) in octets should make nasty
> workarounds needless.
> 
> What is your opinion?

Yes, that is what I'd be inclined to so.  In fact, if faced with
designing an ABI for your NXP SDMA processor from scratch I'd avoid
the octets_per_byte conversion entirely by using octets from assembly
onwards.  Addresses would always be multiples of two, and you'd design
relocations to suit.  Users of course would need to write ". + 2"
rather than ". + 1" and similarly in other expressions involving
addresses.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]