From 7d79b552e36dc94f81231849443dcb7b63aa8457 Mon Sep 17 00:00:00 2001 From: George Rimar Date: Wed, 24 Jul 2019 12:24:43 +0000 Subject: [PATCH] [llvm-objdump] - Import the test/Object/X86/no-start-symbol.test test case and rewrite it to use YAML. This patch removes test/Object/X86/no-start-symbol.test (rewrites it to use YAML and moves it to llvm-objdump tests folder). (This test was initially introduced in rL239039, but now there is no reason to keep the precompiled binary it seems). DIfferential revision: https://reviews.llvm.org/D65136 llvm-svn: 366896 --- llvm/test/Object/Inputs/no-start-symbol.elf-x86_64 | Bin 544 -> 0 bytes llvm/test/Object/X86/no-start-symbol.test | 10 -------- .../disassemble-no-symbol-at-section-start.test | 28 +++++++++++++++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) delete mode 100644 llvm/test/Object/Inputs/no-start-symbol.elf-x86_64 delete mode 100644 llvm/test/Object/X86/no-start-symbol.test create mode 100644 llvm/test/tools/llvm-objdump/X86/disassemble-no-symbol-at-section-start.test diff --git a/llvm/test/Object/Inputs/no-start-symbol.elf-x86_64 b/llvm/test/Object/Inputs/no-start-symbol.elf-x86_64 deleted file mode 100644 index b2c9edc300d03fd8165801d4c9473b66a3b5171e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmb<-^>JfjWMpQ50!9Wq21XbMiC%!jb^x;-7}$U+Crm(+z{2DKi!ouEsaKL(QNo~? zR9wuEmY>g{S6ot5l9&XfD|5kgN@7VO7V}6I5&&v|dk#r+1(dCZBnD!l`yIpwVK$H? z5^#XBnUKUlOcpf00+0{VkM0H+G<7g8x_)+`1P2BBC4hR--3YSF14ICU0fYj(5u^@e K7YKm#fdBwvX%b)n diff --git a/llvm/test/Object/X86/no-start-symbol.test b/llvm/test/Object/X86/no-start-symbol.test deleted file mode 100644 index 53c33de..0000000 --- a/llvm/test/Object/X86/no-start-symbol.test +++ /dev/null @@ -1,10 +0,0 @@ -RUN: llvm-objdump -d %p/../Inputs/no-start-symbol.elf-x86_64 | FileCheck %s - -Test that we disassemble the start of the section. - -CHECK: Disassembly of section .text: -CHECK-EMPTY: -CHECK-NEXT: .text: -CHECK-NEXT: 0: 90 nop -CHECK: foo: -CHECK-NEXT: 1: 90 nop diff --git a/llvm/test/tools/llvm-objdump/X86/disassemble-no-symbol-at-section-start.test b/llvm/test/tools/llvm-objdump/X86/disassemble-no-symbol-at-section-start.test new file mode 100644 index 0000000..88ecad2 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/X86/disassemble-no-symbol-at-section-start.test @@ -0,0 +1,28 @@ +## Test that we disassemble the start of the section even +## if there is no start symbol. + +# RUN: yaml2obj %s -o %t +# RUN: llvm-objdump -d %t | FileCheck %s + +# CHECK: Disassembly of section .text: +# CHECK-EMPTY: +# CHECK-NEXT: .text: +# CHECK-NEXT: 0: 90 nop +# CHECK: foo: +# CHECK-NEXT: 1: 90 nop + +--- !ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + Content: '9090' +Symbols: + - Name: foo + Section: .text + Value: 0x0000000000000001 -- 2.7.4