summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-05-22 15:12:51 +0000
committerFangrui Song <maskray@google.com>2019-05-22 15:12:51 +0000
commitc289d218b9fa9c78e7ae631208a8b06663dd803d (patch)
tree9a5e24805ede962f9ddc3ff9fcd34e93b88d8b49 /llvm/test
parent74b791b4f721ff17ffbf9322aa6f47e2f3cca0dc (diff)
downloadbcm5719-llvm-c289d218b9fa9c78e7ae631208a8b06663dd803d.tar.gz
bcm5719-llvm-c289d218b9fa9c78e7ae631208a8b06663dd803d.zip
[llvm-objdump] Dump inline relocations if the relocated section is specified with --section
This fixes PR41886: llvm-objdump -d -r -j .text doesn't show inline relocations of .text While here, switch to stable_sort() because we don't want to change the order of relocations applied to the same location. gABI says consecutive relocation records are composed together and their order matters. In practise it is difficult to see relocations applied to the same location not consecutive, we just have to keep the relative order of relocations with the same offset. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D62253 llvm-svn: 361395
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test13
1 files changed, 2 insertions, 11 deletions
diff --git a/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test b/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test
index f36627e4c9a..5411288019d 100644
--- a/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test
+++ b/llvm/test/tools/llvm-objdump/X86/section-filter-relocs.test
@@ -1,7 +1,4 @@
## Test that --section works correctly for -d with -r.
-## FIXME: Inline relocations are only printed if the relocation section itself is
-## specified with --section. This test just characterizes the existing behavior.
-## See https://bugs.llvm.org/show_bug.cgi?id=41886
# RUN: yaml2obj %s -o %t.o
## Show non-executable sections are not disassembled even if specified,
@@ -12,21 +9,15 @@
## executable sections if requested explicitly.
## See https://bugs.llvm.org/show_bug.cgi?id=41897.
# RUN: llvm-objdump -d -r %t.o --section=.text --section=.rodata \
-# RUN: | FileCheck %s --check-prefix=DISASM --implicit-check-not=.text2 \
-# RUN: --implicit-check-not=.rodata --implicit-check-not=R_X86_64
-
-## Show that only the specified relocation sections that patch the
-## disassembled sections are dumped.
-# RUN: llvm-objdump -d -r %t.o --section=.text \
-# RUN: --section=.rela.text --section=.rela.text2 \
# RUN: | FileCheck %s --check-prefixes=DISASM,RELOC --implicit-check-not=.text2 \
-# RUN: --implicit-check-not=R_X86_64
+# RUN: --implicit-check-not=.rodata
# DISASM: Disassembly of section .text:
# DISASM-EMPTY:
# DISASM-NEXT: 0000000000000400 .text:
# DISASM-NEXT: 400: e8 00 00 00 00 callq 0 <.text+0x5>
# RELOC-NEXT: 00000401: R_X86_64_PC32 foo+1
+# RELOC-NEXT: 00000401: R_X86_64_GOT32 foo
--- !ELF
FileHeader:
OpenPOWER on IntegriCloud