[prev in list] [next in list] [prev in thread] [next in thread] 

List:       binutils
Subject:    Re: PPC64 new ABI .opd symbols
From:       Alan Modra <amodra () bigpond ! net ! au>
Date:       2005-08-30 0:29:06
Message-ID: 20050830001706.GC2687 () bubble ! grove ! modra ! org
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic