2017-02-07 17:58:27 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=i386-pc-linux-gnu %s -o %t1.o
|
|
|
|
|
|
|
|
# RUN: ld.lld %t1.o -o %t.out
|
|
|
|
# RUN: llvm-objdump -s -t %t.out | FileCheck %s
|
[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: SYMBOL TABLE:
|
2020-03-05 09:19:18 +08:00
|
|
|
# CHECK: 004010b7 l .und
|
2017-02-07 17:58:27 +08:00
|
|
|
# CHECK: Contents of section .text:
|
2019-08-20 16:43:47 +08:00
|
|
|
# CHECK-NEXT: 4010b4 020000
|
|
|
|
## 0x4010b7 - 0x4010b4 + addend(-1) = 0x02
|
|
|
|
## 0x4010b7 - 0x4010b5 + addend(-2) = 0x0000
|
2017-02-07 17:58:27 +08:00
|
|
|
|
|
|
|
.byte und-.-1
|
|
|
|
.short und-.-2
|
|
|
|
|
|
|
|
.section .und, "ax"
|
|
|
|
und:
|