2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: mips
|
2015-12-02 05:24:45 +08:00
|
|
|
# Check warning on orphaned R_MIPS_HI16 relocations.
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -o %t.exe 2>&1 | FileCheck -check-prefix=WARN %s
|
2019-09-07 23:44:40 +08:00
|
|
|
# RUN: llvm-objdump -d -t --print-imm-hex --no-show-raw-insn %t.exe | FileCheck %s
|
2015-12-02 05:24:45 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
.globl __start
|
|
|
|
__start:
|
|
|
|
lui $t0,%hi(__start+0x10000)
|
2015-12-13 14:49:08 +08:00
|
|
|
addi $t0,$t0,%lo(_label)
|
|
|
|
_label:
|
|
|
|
nop
|
2015-12-02 05:24:45 +08:00
|
|
|
|
2016-03-15 22:00:22 +08:00
|
|
|
# WARN: can't find matching R_MIPS_LO16 relocation for R_MIPS_HI16
|
2015-12-02 05:24: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: SYMBOL TABLE:
|
2020-03-05 09:19:18 +08:00
|
|
|
# CHECK: 00020{{0*}}[[VAL:[0-9a-f]+]] l .text 00000000 _label
|
|
|
|
# CHECK: 00020{{.*}} g .text 00000000 __start
|
[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
|
|
|
|
2020-03-06 06:18:38 +08:00
|
|
|
# CHECK: <__start>:
|
2019-09-07 23:44:40 +08:00
|
|
|
# CHECK-NEXT: lui $8, 0x3
|
|
|
|
# ^-- %hi(__start) w/o addend
|
[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-NEXT: addi $8, $8, 0x[[VAL]]
|
2019-09-07 23:44:40 +08:00
|
|
|
# ^-- %lo(_label)
|