Effects of Static Local Variable Relocations not reduced to Section Symbols?

Alan Modra amodra@bigpond.net.au
Sat May 15 08:36:00 GMT 2004


On Fri, May 14, 2004 at 03:22:53PM +0100, Narendra Kiran Chinnam wrote:
> Due to a project Iam working on, I need to make sure
> that the local static variable relocations are not 
> reduced to section symbols. 

In that case you should modify tc_fix_adjustable, not S_FORCE_RELOC.

> I was successful running some sample programs compiled
> with the modified gas, but apache crashed giving
> segmentation fault (seemed to went wrong in ld.so but
> not sure). Does this modification have any side
> effects? 

It is likely that the change you made to S_FORCE_RELOC results in bad
shared libraries.  A peculiarity of glibc ld.so is to adjust absolute
symbols by the load address of the shared library.  Normally, you
wouldn't have relocs against absolute symbols, as the assembler will
resolve expressions if it can.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list