llvm-project/llvm/test/tools/llvm-objdump/X86
James Henderson abd335a339 [llvm-objdump] Fix unstable disassembly output for sections with same address
When two sections shared the same address, the disassembly code was
using pointer values when sorting (see the SectionRef less than
operator). Since those values aren't guaranteed to have a specific
order, this meant the disassembly code would sometimes change which
section to pick when finding symbols targeted by calls in fully linked
objects.

This change fixes the non-determinism, so that the same section is
always picked. This might have a negative impact in that now a section
without any symbol might be picked over a section with symbols, but this
will be addressed in a later commit.

Fixes https://bugs.llvm.org/show_bug.cgi?id=45411.

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D77640
2020-04-08 10:57:12 +01:00
..
Inputs [llvm-objdump][test] Move {AArch64,X86}/macho-* to MachO/ 2020-03-15 15:05:12 -07:00
adjust-vma.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
coff-dis-internal.test
coff-disassemble-export.test [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
debug-info-fileinfo.test
demangle.s [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
disassemble-align.s [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
disassemble-archive-with-source.ll Migrate function attribute "no-frame-pointer-elim-non-leaf" to "frame-pointer"="non-leaf" as cleanups after D56351 2019-12-24 16:05:15 -08:00
disassemble-code-data-mix.s [llvm-objdump] Remove unnecessary indentation when dumping ELF data. 2019-06-19 18:44:29 +00:00
disassemble-data.test
disassemble-demangle.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
disassemble-functions-mangling.test [llvm-objdump] Rename --disassemble-functions to --disassemble-symbols 2020-03-09 08:25:45 -07:00
disassemble-functions.test Be more strict when checking existence of foo 2020-03-15 12:02:19 +09:00
disassemble-implied-by-disassemble-functions.test [llvm-objdump] Rename --disassemble-functions to --disassemble-symbols 2020-03-09 08:25:45 -07:00
disassemble-invalid-byte-sequences.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
disassemble-long-instructions.test [llvm-objdump][test] Improve testing of some switches #3 2019-05-23 12:30:39 +00:00
disassemble-no-symbol-at-section-start.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
disassemble-same-section-addr.test [llvm-objdump] Fix unstable disassembly output for sections with same address 2020-04-08 10:57:12 +01:00
disassemble-section-name.s [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
disassemble-show-raw.test [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
disassemble-text.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
disassemble-zeroes-relocations.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
elf-disassemble-bss.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
elf-disassemble-dynamic-symbols.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
elf-disassemble-no-symtab.test [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
elf-disassemble-relocs.test [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
elf-disassemble-symbol-labels-exec.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
elf-disassemble-symbol-labels-rel.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
elf-disassemble-symbol-references.yaml [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
elf-disassemble.test [test] llvm/test/: change llvm-objdump single-dash long options to double-dash options 2020-03-15 17:46:23 -07:00
elf-dynamic-relocs.test [llvm-objdump] Print file format in lowercase to match GNU output. 2020-02-12 08:17:01 -08:00
elf-dynamic-symbols.test [llvm-objdump] Teach `llvm-objdump` dump dynamic symbols. 2020-04-05 10:46:59 +08:00
function-sections-line-numbers.s [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
invalid-macho-build-version.yaml [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
lit.local.cfg
out-of-section-sym.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
output-ordering.test [llvm-objdump] Print file format in lowercase to match GNU output. 2020-02-12 08:17:01 -08:00
phdrs-lma.test [test] Use yaml2obj -o %t instead of > %t 2020-01-21 17:20:18 -08:00
phdrs-lma2.test [yaml2obj] - Set a default value for `PAddr` property of a program header to a value of `VAddr` 2020-03-14 17:44:57 +03:00
phdrs.test
plt.test [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
print-symbol-addr.s [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
section-filter-disasm.test [llvm-objdump] - Disassemble non-executable sections if specifically requested. 2019-06-05 11:37:53 +00:00
section-filter-relocs.test [X86InstPrinter] Change printPCRelImm to print the target address in hexadecimal form 2020-03-26 08:28:59 -07:00
section-index.s [llvm-objdump][test] Change llvm-objdump tests to use double dash options 2020-03-15 16:01:26 -07:00
source-interleave-function-from-debug.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-invalid-source.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-missing-source.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-no-debug-info.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-relative-paths.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-same-line-different-file.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
source-interleave-x86_64.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
start-stop-address-relocatable-object.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
start-stop-address.test [llvm-objdump] -d: print `00000000 <foo>:` instead of `00000000 foo:` 2020-03-05 18:05:28 -08:00
warn-missing-disasm-func.test [llvm-objdump] Rename --disassemble-functions to --disassemble-symbols 2020-03-09 08:25:45 -07:00