This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Missing symbols from dynamic hash table on ia64
- From: Alan Modra <amodra at gmail dot com>
- To: Jiri Svoboda <jirik dot svoboda at seznam dot cz>
- Cc: binutils at sourceware dot org, helenos-devel at lists dot modry dot cz
- Date: Sat, 1 Jun 2019 16:18:56 +0930
- Subject: Re: Missing symbols from dynamic hash table on ia64
- References: <zGM.6BZ.4zikk8p1F}Q.1SxZ5w@seznam.cz>
On Wed, May 29, 2019 at 09:15:06AM +0200, Jiri Svoboda wrote:
> When I build a shared library for ia64 (I can reproduce this with target ia
> 64-pc-linux-gnu-gcc), the linker generates relocations against local symbols
> - for static functions that we take pointer to, I assume this is because the
> function descriptors from the Itanium ABI need the absolute address of the
> function. These local symbols are present in the dynamic symbol table, but *
> not present* in the dynamic hash table.
[snip]
> Can anybody advise on whether this is some kind of expected behavior, or
> should it be considered a bug? This makes it difficult for the dynamic
> linker to resolve the references efficiently. It seems prettty surpsising
> that this would go on unnoticed if it were a bug...
.gnu_hash deliberately excludes local symbols. There is no need to
look up local symbols by name, thus no need of a hash entry. Any
dynamic relocation against a local symbol will always use the value of
that symbol in the current dynamic object.
Note also that dynamic relocations against local symbols can in most
cases be reduced by the linker to a RELATIVE reloc, or some other
dynamic reloc with a zero symbol index.
--
Alan Modra
Australia Development Lab, IBM