2018-12-19 18:21:45 +08:00
|
|
|
# RUN: llvm-mc %s -filetype=obj -triple=x86_64-pc-linux -o %t
|
2019-04-25 18:25:52 +08:00
|
|
|
# RUN: llvm-objdump -t -r --demangle %t | FileCheck %s
|
2018-12-19 18:21:45 +08:00
|
|
|
|
|
|
|
## Check we demangle symbols when printing symbol table.
|
|
|
|
# CHECK: SYMBOL TABLE:
|
2020-03-04 08:59:33 +08:00
|
|
|
# CHECK-NEXT: 0000000000000000 g F .text 0000000000000000 foo()
|
2018-12-19 18:21:45 +08:00
|
|
|
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
## Check we demangle symbols when printing relocations.
|
2019-11-19 19:58:50 +08:00
|
|
|
# CHECK: 000000000000001 R_X86_64_PLT32 foo()-0x4
|
[llvm-objdump] Further rearrange llvm-objdump sections for compatability
Summary:
rL371826 rearranged some output from llvm-objdump for GNU objdump compatability, but there still seem to be some more.
I think this rearrangement is a little closer. Overview of the ordering which matches GNU objdump:
* Archive headers
* File headers
* Section headers
* Symbol table
* Dwarf debugging
* Relocations (if `--disassemble` is not used)
* Section contents
* Disassembly
Reviewers: jhenderson, justice_adams, grimar, ychen, espindola
Reviewed By: jhenderson
Subscribers: aprantl, emaste, arichardson, jrtc27, atanasyan, seiya, llvm-commits, MaskRay
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D68066
llvm-svn: 373671
2019-10-04 06:01:08 +08:00
|
|
|
|
2018-12-19 18:21:45 +08:00
|
|
|
## Check the case when relocations are inlined into disassembly.
|
2019-04-25 18:25:52 +08:00
|
|
|
# RUN: llvm-objdump -d -r --demangle %t | FileCheck %s --check-prefix=INLINE
|
2020-03-06 06:18:38 +08:00
|
|
|
# INLINE: <foo()>:
|
2020-04-18 23:23:37 +08:00
|
|
|
# INLINE-NEXT: 0: {{.*}} callq 0x5 <foo()+0x5>
|
2019-11-19 19:58:50 +08:00
|
|
|
# INLINE-NEXT: 0000000000000001: R_X86_64_PLT32 foo()-0x4
|
2018-12-19 18:21:45 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl _Z3foov
|
|
|
|
.type _Z3foov,@function
|
|
|
|
_Z3foov:
|
|
|
|
callq _Z3foov@PLT
|