bug-binutils
[Top][All Lists]
Advanced

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

[Bug ld/26936] [ld, PIE] ld drops relocation for .text.__x86.get_pc_thun


From: vries at gcc dot gnu.org
Subject: [Bug ld/26936] [ld, PIE] ld drops relocation for .text.__x86.get_pc_thunk.bx
Date: Tue, 24 Nov 2020 14:53:54 +0000

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

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|1                           |0
            Version|2.35                        |2.36 (HEAD)
             Status|WAITING                     |UNCONFIRMED

--- Comment #10 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to H.J. Lu from comment #9)
> (In reply to Tom de Vries from comment #8)
> 
> > 
> > I see, yes that looks OK, thanks for showing me.
> > 
> > I hope then that it will reproduce for you with the .s based approach from
> > comments 3/4/5.
> 
> Please try binutils master branch.

Build binutils from today's commit 50757f95a8:
...
$ ls ~/binutils/install/bin/
addr2line  c++filt  ld      nm       objdump  readelf  strings
ar         elfedit  ld.bfd  objcopy  ranlib   size     strip
...

So we have:
...
$ ~/binutils/install/bin/ld -v
GNU ld (GNU Binutils) 2.35.50.20201124
...

Then build the .s files using the freshly build ld:
...
$ gcc -B /home/vries/binutils/install/bin -g split-1.s morestack.S -m32 -pie
-Wl,-v
collect2 version 7.5.0
/home/vries/binutils/install/bin/ld -plugin
/usr/lib64/gcc/x86_64-suse-linux/7/liblto_plugin.so
-plugin-opt=/usr/lib64/gcc/x86_64-suse-linux/7/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccAPzqvf.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id
--eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -pie
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/Scrt1.o
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/crti.o
/usr/lib64/gcc/x86_64-suse-linux/7/32/crtbeginS.o
-L/usr/lib64/gcc/x86_64-suse-linux/7/32
-L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib/../lib
-L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/home/vries/binutils/install/bin
-L/usr/lib64/gcc/x86_64-suse-linux/7
-L/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/lib
-L/usr/lib64/gcc/x86_64-suse-linux/7/../../.. /tmp/ccvuPjjl.o /tmp/ccwj6r5B.o
-v -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /usr/lib64/gcc/x86_64-suse-linux/7/32/crtendS.o
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib/crtn.o
GNU ld (GNU Binutils) 2.35.50.20201124
...

And, reproduced:
...
$ ~/binutils/install/bin/readelf -wL a.out | grep morestack.S | tail
morestack.S  808              0x151e               x
morestack.S  812              0x1524               x
morestack.S  830              0x1525               x
morestack.S  831              0x1529               x
morestack.S  832              0x152d               x
morestack.S  838              0x1532               x
morestack.S    -              0x1533
morestack.S  636                   0               x
morestack.S  637                 0x3               x
morestack.S    -                 0x4
...

-- 
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]