[PATCH 3/6] Add support for DSBT ELF to ld.so

Bernd Schmidt bernds at codesourcery.com
Thu Feb 24 23:33:19 UTC 2011


On 02/24/2011 12:12 AM, Mike Frysinger wrote:
> On Wednesday, February 23, 2011 14:05:49 Bernd Schmidt wrote:
>> --- a/ldso/include/dl-defs.h
>> +++ b/ldso/include/dl-defs.h
>> @@ -212,7 +212,7 @@ typedef struct {
>>     _dl_find_hash for this reloc TYPE.  TPNT is the module in which the
>>     matching SYM was found.  */
>>  #ifndef DL_FIND_HASH_VALUE
>> -# define DL_FIND_HASH_VALUE(TPNT, TYPE, SYM) (DL_RELOC_ADDR
>> ((SYM)->st_value, (TPNT)->loadaddr))
>> +# define DL_FIND_HASH_VALUE(TPNT, TYPE, SYM) (DL_RELOC_ADDR ((TPNT)-
>> loadaddr, (SYM)->st_value))
>> #endif
> 
> is this correct ?  this is non-fdpic code, and seems like it should be a sep 
> change if it's a common ELF code bugfix.  the changelog makes no mention of 
> this either ...

It's correct, as we have

  #define DL_RELOC_ADDR(LOADADDR, ADDR)

everywhere. No other architecture is affected, as the default definition
of DL_RELOC_ADDR is

# define DL_RELOC_ADDR(LOADADDR, ADDR) \
	((LOADADDR) + (ADDR))

and the FD-PIC targets define their own DL_FIND_HASH_VALUE.


Bernd


More information about the uClibc mailing list