.set doesn't work with .comm (Re: Does the current glibc build?)

H. J. Lu hjl@lucon.org
Thu Jan 15 19:39:00 GMT 2004


On Thu, Jan 15, 2004 at 11:09:46AM -0800, Ulrich Drepper wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> H. J. Lu wrote:
> > __libc_stack_end is now hidden in rtld.c. But it is still referenced by
> > backtrace.c. As the result, I got undefined symbol during glibc build.
> > Did I miss somehing?
> 
> $ readelf -s elf/ld.so|fgrep __libc_stack_end
>    33: 00014f3c      4 OBJECT  GLOBAL DEFAULT       13
> __libc_stack_end@@GLIBC_2.1
>   472: 00014f3c      4 OBJECT  LOCAL  HIDDEN        13 __GI___libc_stack_end
>   581: 00014f3c      4 OBJECT  GLOBAL DEFAULT       13 __libc_stack_end
> 
> 
> Something on your system is broken if __libc_stack_end is hidden in your
> builds.
> 

You didn't test linker without -z relro. .set doesn't work with .comm.
There is

void *__libc_stack_end attribute_relro;

When __libc_stack_end is a common symbol, .set no longer works on a
common symbol. The assembler doesn't complain. I think assembler
should complain in this case.


H.J.



More information about the Binutils mailing list