bug-binutils
[Top][All Lists]
Advanced

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

[Bug gold/12372] New: Segfault with STT_GNU_IFUNC symbols on x86_64


From: hjl.tools at gmail dot com
Subject: [Bug gold/12372] New: Segfault with STT_GNU_IFUNC symbols on x86_64
Date: Thu, 6 Jan 2011 19:01:46 +0000

http://sourceware.org/bugzilla/show_bug.cgi?id=12372

           Summary: Segfault with STT_GNU_IFUNC symbols on x86_64
           Product: binutils
           Version: 2.22 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden
                CC: address@hidden, address@hidden
        Depends on: 12366


+++ This bug was initially created as a clone of Bug #12366 +++

The x86 and x86_64 IFUNC code assumes that check_relocs can rely on def_regular
being set for all regular definitions.  That's not true, because def_regular is
set by the same pass that calls check_relocs, and doesn't therefore take into
account regular definitions in later objects.  Everything works if the regular
definition comes before the regular use, but not the other way round.
+++

address@hidden pr12366-1]$ make LD=ld.gold
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o main.o main.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o bar.o bar.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o foo.o foo.c
ld.gold  -shared -o libfoo.so bar.o foo.o
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -o main main.o libfoo.so
-Wl,-rpath,.
./main
make: *** [all] Segmentation fault
address@hidden pr12366-1]$ 

GNU linker works:

address@hidden pr12366-1]$ make clean
rm -f a.out *.o *.so
address@hidden pr12366-1]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o main.o main.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o bar.o bar.c
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -fPIC    -c -o foo.o foo.c
./ld  -shared -o libfoo.so bar.o foo.o
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -o main main.o libfoo.so
-Wl,-rpath,.
./main
Hello, world!
address@hidden pr12366-1]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]