This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libelf: Do not cast pointer to integer in gelf_newphdr
- From: Mark Wielaard <mjw at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 13 Oct 2016 12:28:37 +0200
- Subject: Re: [PATCH] libelf: Do not cast pointer to integer in gelf_newphdr
On Tue, 2016-10-11 at 23:12 +0900, Akihiko Odaki wrote:
> unsigned long int is not always capable to have pointer in some cases
> (LLP64, for example).
This makes sense, but it does change a public API. One we share with
other libelf implementations. So I'll like to discuss this first to make
sure this doesn't break something subtle. I believe it is binary
compatible on any currently supported architecture. And indeed it is
broken for any architecture that doesn't have sizeof(long) ==
sizeof(void *). There might be some source compatibility issues. If a
user stored the result in a long without cast that would now generate a
warning I suppose.