This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: COMMITTED: Add support for STT_IFUNC
- From: Daniel Jacobowitz <drow at false dot org>
- To: binutils at sourceware dot org
- Date: Wed, 3 Dec 2008 11:20:41 -0500
- Subject: Re: COMMITTED: Add support for STT_IFUNC
- References: <m33ah5l3iv.fsf@redhat.com>
On Wed, Dec 03, 2008 at 02:47:04PM +0000, Nick Clifton wrote:
> Run-time relocations against this symbol type are placed into a new
> section called .rel[a].ifunc.dyn which immediately follows the
> .rel[a].dyn section. The idea here is to allow the dynamic linker
> to execute all of the normal dynamic relocations first, before it
> tries to execute any of the STT_IFUNC using dynamic relocs. This is
> just in case the invoked STT_IFUNC function has any dependencies
> upon other symbols.
Interesting. I had to read it a couple of times to work out how this
worked, but I think I understand.
> Plus objdump and readelf will append "()" to relocs which are made
> against STT_IFUNC symbols, as a hint that the relocation invokes a
> function:
>
> RELOCATION RECORDS FOR [.text]:
> OFFSET TYPE VALUE
> 00000009 R_386_32 .rodata
> 0000009f R_386_PC32 ifunction()
This is ambiguous w.r.t. C++ demangling. Maybe *ifunction? Still,
technically, ambiguous but less likely.
--
Daniel Jacobowitz
CodeSourcery