[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug binutils/24702] objdump: use STT_SECTION symbol in the symbolizer
From: |
i at maskray dot me |
Subject: |
[Bug binutils/24702] objdump: use STT_SECTION symbol in the symbolizer |
Date: |
Thu, 07 Jan 2021 20:38:17 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=24702
--- Comment #1 from Fangrui Song <i at maskray dot me> ---
The idea is that section+offset should be preferred over
far_away_symbol+large_offset because the former is more relevant.
Update: d1bcae833b32f1408485ce69f844dcd7ded093a8 ("ELF: Don't generate unused
section symbols") may reveal more instances. This suggests that even in the
absence of STT_SECTION (they are optional, not useful if no relocation
references them), we should synthesize them from section headers.
--- a/ld/testsuite/ld-x86-64/pr21038b.d
+++ b/ld/testsuite/ld-x86-64/pr21038b.d
@@ -53,7 +53,7 @@ Disassembly of section .plt:
+[a-f0-9]+: f2 ff 25 53 0e 20 00 bnd jmp \*0x200e53\(%rip\) #
201010 <_GLOBAL_OFFSET_TABLE_\+0x10>
+[a-f0-9]+: 0f 1f 00 nopl \(%rax\)
+[a-f0-9]+: 68 00 00 00 00 push \$0x0
- +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1b0 <.plt>
+ +[a-f0-9]+: f2 e9 e5 ff ff ff bnd jmp 1b0 <func@plt-0x20>
+[a-f0-9]+: 0f 1f 44 00 00 nopl 0x0\(%rax,%rax,1\)
- +[a-f0-9]+: e9 e0 ff ff ff jmp 180 <.plt>
+ +[a-f0-9]+: e9 e0 ff ff ff jmp 180 <\*ABS\*@plt-0x10>
--- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
@@ -9,11 +9,11 @@
Disassembly of section .text:
0+4000c8 <__start>:
- +[a-f0-9]+: ff 15 2a 00 20 00 call \*0x20002a\(%rip\) #
6000f8 <.got>
- +[a-f0-9]+: ff 25 24 00 20 00 jmp \*0x200024\(%rip\) #
6000f8 <.got>
- +[a-f0-9]+: 48 03 05 1d 00 20 00 add 0x20001d\(%rip\),%rax #
6000f8 <.got>
- +[a-f0-9]+: 48 8b 05 16 00 20 00 mov 0x200016\(%rip\),%rax #
6000f8 <.got>
- +[a-f0-9]+: 48 85 05 0f 00 20 00 test %rax,0x20000f\(%rip\) #
6000f8 <.got>
+ +[a-f0-9]+: ff 15 2a 00 20 00 call \*0x20002a\(%rip\) #
6000f8 <bar\+0x200007>
+ +[a-f0-9]+: ff 25 24 00 20 00 jmp \*0x200024\(%rip\) #
6000f8 <bar\+0x200007>
+ +[a-f0-9]+: 48 03 05 1d 00 20 00 add 0x20001d\(%rip\),%rax #
6000f8 <bar\+0x200007>
+ +[a-f0-9]+: 48 8b 05 16 00 20 00 mov 0x200016\(%rip\),%rax #
6000f8 <bar\+0x200007>
+ +[a-f0-9]+: 48 85 05 0f 00 20 00 test %rax,0x20000f\(%rip\) #
6000f8 <bar\+0x200007>
+[a-f0-9]+: 48 c7 c0 f1 00 40 00 mov \$0x4000f1,%rax
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug binutils/24702] objdump: use STT_SECTION symbol in the symbolizer,
i at maskray dot me <=