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: libelf gelf_newehdr and gelf_newphdr return types


On Fri, 2016-12-02 at 13:39 -0700, Ali Bahrami wrote:
> Although uintptr_t would work, it seems unnecessary. Note that freebsd
> already uses 'void *', and surely they build most of the same ELF-related
> FOSS code that we might be concerned about, so I think that the libelf
> code already has ported easily. As such, and given that 'void *' is the
> common C idiom for this sort of use, I think it would make sense to
> use it.

I was leaning towards using uintptr_t. But given that other libelf
implementations use void * already for the return type of these two
functions it does seem better to just consolidate on that. It also seems
more in line with the original intent of the gelf functions (return a
pointer to the newly constructed header or NULL of failure).

Cheers,

Mark

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