This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libelf: Drop internal_function from __libelf_set_data_list_rdlock.
- From: Alexander Cherepanov <ch3root at openwall dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Thu, 19 Feb 2015 15:37:33 +0300
- Subject: Re: [PATCH] libelf: Drop internal_function from __libelf_set_data_list_rdlock.
On 2015-02-18 22:57, Mark Wielaard wrote:
> On Tue, 2015-02-17 at 21:00 +0300, Alexander Cherepanov wrote:
>> Have to use this patch when building 32-bit version of elfutils for the
>> latest round of fuzzing.
> Sorry about that. It was introduced by my commit b543cd "libelf: Fix
> elf_newdata when raw ELF file/image data is available".
> I see there is more stuff broken on i686. Also introduced by me. Sigh.
Another problem I met with 32-bit build is that nm lost its -C option
(and there is /* #undef USE_DEMANGLE */ in config.h).
> I am setting up a buildbot to catch these thing earlier in the future.
>> __libelf_set_data_list_rdlock from elf_getdata.c is also used in
>> elf_newdata.c and even described in libelfP.h. Drop internal_function
>> attribute accordingly. This prevented 32-bit builds.
> I think this is the wrong way around. The function is still "internal".
> Which means we only use it for internal libelf calls and don't export
Ah, it's internal to a library, not to a file. I should be more cautious.
> The reason it breaks on i686 is because in that case defining it as
> an internal_function changes the calling convention. See lib/eu-config:
> #ifdef __i386__
> # define internal_function __attribute__ ((regparm (3), stdcall))
> # define internal_function /* nothing */
> So instead of dropping it in the implementation, I think we should add
> it in the definition.
> Does the attach solve your issue?
Yes, it works fine, thanks!