This is the mail archive of the 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] Fix several mix up between octets and bytes in ELF program headers

On Thu, Dec 05, 2019 at 06:40:14AM +0100, Christian Eggers wrote:
> as in my previous patches, I tried to keep as much as it is and reduce the
> changes to a minimum. But this is not necessarily the "correctest" way to do
> it. When analyzing the existing code, I came to the conclusion, that sizes are
> currently handled in octets while addresses are handled in bytes.

Yes, that is how the existing ld code works.

> Doing everything in the same unit would also look more consistent for me.
> Using "bytes" (as mentioned in the ELF spec) would introduce the risk of
> running into trouble for things like DWARF debug information (even if these
> sections are not part of the program headers). Using octets should be more
> future proof.

Please note that I'm fine with ld and bfd internally recording
addresses in (non-octet) bytes.  I think that will probably be easiest
given that much of ld works that way already.

I was only questioning whether it made sense to use octets everywhere
in the ELF file headers.

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]