bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/19073] S/390: ld: Segmentation fault building Glibc


From: krebbel at linux dot vnet.ibm.com
Subject: [Bug ld/19073] S/390: ld: Segmentation fault building Glibc
Date: Mon, 12 Oct 2015 13:16:42 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19073

--- Comment #13 from Andreas Krebbel <krebbel at linux dot vnet.ibm.com> ---
(In reply to H.J. Lu from comment #10)
> (In reply to Andreas Krebbel from comment #8)
> > (In reply to H.J. Lu from comment #7)
> > > Please provide a testcase I can reproduce it on x86-64 with
> > > only cross binutils.
> > 
> > The testcase I've attached fails the same way with cross binutils:
> > 
> > install-s390x/bin/s390x-ibm-linux-ld -melf64_s390 b.os
> > Segmentation fault (core dumped)
> 
> address@hidden pr19073]$ cat xxx.c
> void
> __foo ()
> {
> }
> 
> asm (".weak foo_v1");
> asm (".globl foo_v1");
> asm (".set foo_v1, __foo");
> asm (".weak foo_v2");
> asm (".globl foo_v2");
> asm (".set foo_v2, __foo");
> asm (".symver foo_v2,address@hidden");
> asm (".symver foo_v1,foo@@VERS.1");
> asm (".globl foo");
> asm (".weak foo");
> asm (".set foo, __foo");
> address@hidden pr19073]$ make libfoo.so
> gcc -B./ -fPIC   -c -o xxx.o xxx.c
> ./ld -o foo.o -r xxx.o
> ./ld -o libfoo.so -shared foo.o --version-script foo.v
> Makefile:12: recipe for target 'libfoo.so' failed
> make: *** [libfoo.so] Segmentation fault
> make: *** Deleting file 'libfoo.so'
> address@hidden pr19073]$ 
> 
> There is a bug in sysdeps/unix/sysv/linux/s390/s390-64/getcontext.S
> which defines both getcontext@@GLIBC_2.2 and getcontext.  But linker
> shouldn't crash.

I agree that this does not look correct but it is similiar to e.g. setjmp on
x86_64:

readelf -s libc.so.6 | grep " setjmp"
   622: 0000000000032ce0    10 FUNC    GLOBAL DEFAULT   13 setjmp@@GLIBC_2.2.5
  6015: 0000000000032ce0    10 FUNC    GLOBAL DEFAULT   13 setjmp

One difference appears to be that the symbol without version information is
weak on s390.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]