[PATCH 4/5] Add protected symbols support for all architectures
Austin Foxley
austinf at cetoncorp.com
Fri Jan 14 17:56:11 UTC 2011
On 01/12/2011 03:22 AM, Carmelo AMOROSO wrote:
> From: Salvatore Cro <salvatore.cro at st.com>
>
> Protected symbols are global symbols for which interposition is not allowed.
> We manage them in generic _dl_lookup_hash function. To handle protected symbols
> we need to get a reference to the module that defines the symbol itself.
> So we pass a new parameter 'struct symbol_ref' to the __dl_lookup_hash
> that is defined as below:
>
> struct symbol_ref {
> const ElfW(Sym) *sym;
> struct elf_resolve *tpnt;
> };
>
> The tpnt field is used as an ouput parameter and refers to the module which defines
> the protected symbol.
> Further it can be used as output parameter for TLS relocations and FDPIC case.
> The sym field is instead used as an input parameter to detect the visibility of the
> symbol we are looking-up.
> In this way we get rid of different signatures for _dl_lookup_hash, allowing to remove
> the _dl_find_hash wrapper.
> This new structure is also suitable for prelink integration.
>
> Signed-off-by: Salvatore Cro <salvatore.cro at st.com>
> Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
Had time to do a quick build test for sparc. Looks good.
Thanks for doing this!
-Austin
More information about the uClibc
mailing list