PowerPC snapshot compilation failures

Glauber de Oliveira Costa glommer at br.ibm.com
Mon Sep 26 13:45:10 UTC 2005


> > > > > > > > ld  -shared --warn-common --warn-once -z combreloc -z defs
> -s
> > > > > > > > -soname=libdl.so.0 \ -o libdl-0.9.28.so -fini dl_cleanup
> > > > > > > > --whole-archive libdl_pic.a \ --no-whole-archive
> > > > > > > > ../..//libc/misc/internals/interp.o \ -L../..//lib -lc
> > > > > > > > ../../lib/ld-uClibc.so.0
> > > > > > > > /usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/libgcc.a;
> > > > > > > > ld: Error: The symbol `__syscall_error' has a R_PPC_REL24
> > > > > > > > relocation, that means '../..//lib/libc.a(brk.o)' was
> > > > compiled without -fPIC.
> > >
> > > I wonder if not attribute_hidden has been lost for __syscall_error?
> > 
> > Hum... Don't think so.
> > 
> > linux:~/uClibc/libc/sysdeps/linux/powerpc # gcc  -Wall
> > -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing
> -fno-builtin
> > -nostdinc -D_LIBC -I../../../../include -I.  -Os -funit-at-a-time
> > -isystem /usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/include -DNDEBUG
> > -fpic -c __syscall_error.c -E | tail -n6
> > 
> > int __attribute__ ((visibility ("hidden"))) __syscall_error(int
> err_no)
> > {
> >         (((*__errno_location ())) = (err_no));
> > 	       return -1;
> > }
> 
> Maybe your toolchain is broken?
> 
Reasonable assumption... I'll try newer versions, but it'll take a time.
Weekend is over :-)

> You can try a few things:
> 
> Check readelf -a __syscall_error.o if __syscall_error is hidden.
> 
> Try changing "b __syscall_error" to "b __syscall_error at local" or
> add a ".hidden __syscall_error" in affected *.S files

Did it, and it worked. I mean, not completely, but worked enough to be
sure we're closer to the problem. 

changing it in brk.S makes the problem appear in vfork. Changing it
there delays the problem to another one, and so one. I stopped because 
it does not seem to be the way to do it anyway.

BTW, generating assembly code from __syscall_error.c shows that the
function is really hidden.

>  Jocke

-- 
=====================================
Glauber de Oliveira Costa
IBM Linux Technology Center - Brazil
glommer at br.ibm.com
=====================================



More information about the uClibc mailing list