Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

Don't use section name for section start symbol if later symbol exists #40916

Open Quuxplusone opened 5 years ago

Quuxplusone commented 5 years ago
Bugzilla Link PR41946
Status NEW
Importance P enhancement
Reported by James Henderson (jh7370.2008@my.bristol.ac.uk)
Reported on 2019-05-20 08:50:21 -0700
Last modified on 2020-12-09 13:56:28 -0800
Version trunk
Hardware PC Windows NT
CC llvm-bugs@lists.llvm.org, yuanfang.chen@sony.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
llvm-objdump currently prints the section name as a symbol label for the first
address in a section being disassembled, if there are no other symbols
targeting the location. However, GNU objdump prints an expression relative to
the first symbol in the section:

objdump -d test.o

test.o:     file format elf64-x86-64

Disassembly of section .text:

0000000000001000 <sym-0x1>:
    1000:       90                      nop

0000000000001001 <sym>:
    1001:       90                      nop

llvm-objdump  -d test.o

test.o:   file format ELF64-x86-64

Disassembly of section .text:

0000000000001000 .text:
    1000: 90                            nop

0000000000001001 sym:
    1001: 90                            nop

We should consider doing what GNU does here. The section name is not useful,
since it's the same as in the "Disassembly of section" and could be confused
with an actual section symbol at that location.
Quuxplusone commented 5 years ago

Review: https://reviews.llvm.org/D63280