Re: [kfreebsd-amd64] Problem building glib2.0
I still have the problem with a gcc-4.0 rebuilt from source. I have uploaded
it to the archive, as it is a newer version.
Moreover the problem does not seem to come from binutils, as using the .o
files from GNU/Linux fixes the problem. On the contrary I see the same
problem using the .o files from GNU/kFreeBSD on GNU/Linux.
It still can be bug in binutils - in gas.
Please could you compile attached lib.c by commads bellow
on both linux-amd64 and kfreebsd-amd64
and compare .s and .o, especially "readelf -s" ?
gcc -fPIC -O2 -Wall -S lib.c -o lib1.s -DFIRST
gcc -fPIC -O2 -Wall -S lib.c -o lib2.s
gcc -fPIC -O2 -Wall -c lib1.s
gcc -fPIC -O2 -Wall -c lib2.s
gcc -shared -o liblib.so lib1.o lib2.o
Petr
BTW, glibc 2.4 in Debian might be closer than we think
http://sourceware.org/ml/libc-alpha/2006-03/msg00050.html
extern int lib1(int a) __attribute__((visibility("hidden")));
extern int lib2(int a);
#ifdef FIRST
int lib1(int a)
{
if (a)
return a+1;
return lib2(a+1);
}
#else
int lib2(int a)
{
if (a)
return a+1;
return lib1(a+1);
}
#endif
Reply to: