This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils 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] Let libelf.h's loff_t fall back to off_t


On 10/09/2015 01:57 PM, Roland McGrath wrote:
> Hmm.  Is it the case that loff_t or off_t that we want to use will always
> be 64 bits?  The way we use it in the libelf interfaces always wants a
> positive offset (or size).  I don't think change of signedness really needs
> to count as an ABI change here.  Could we just use Elf64_Off and be done
> with it?

It was explicitly off64_t until your commit 1a2e8f4f5bd2.  And yes, as
written I expect either loff_t or off_t to always be 64 bits too.
(I think technically loff_t is "at least" 64 bits.)

However, I'm afraid to change signedness, if only because -1 is used in
error conditions, e.g. returned from elf_update().  Someone checking <0
will be in for a bad time.

How about just int64_t?  We already pull stdint.h for elf.h, so it seems
fine to include and use that in libelf.h too.

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