This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PPC64 new ABI .opd symbols
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: binutils at sources dot redhat dot com, Ulrich Drepper <drepper at redhat dot com>
- Date: Tue, 30 Aug 2005 09:47:06 +0930
- Subject: Re: PPC64 new ABI .opd symbols
- References: <20050829151840.GY15708@sunsite.mff.cuni.cz>
On Mon, Aug 29, 2005 at 05:18:40PM +0200, Jakub Jelinek wrote:
> Is there any (reliable and cheap) way how to recognize new PPC64 ABI (==
> dotless PPC64 ABI) .opd symbols from the dynamic linker/libc.so?
> glibc can't use section header table for that (as it can be stripped
> off and in any case isn't loaded at runtime).
Yes. Any STT_FUNC symbol defined outside of the text segment must be in
the .opd section. You could use l->l_ld too.
((ELFW(ST_TYPE) (sym->st_info) == STT_FUNC
&& l->l_addr + sym->st_value >= (ElfW(Addr)) (l->l_ld)
&& l->l_addr + sym->st_value < l->l_map_end
&& sym->st_size != 0)
--
Alan Modra
IBM OzLabs - Linux Technology Centre