[ELF] Explicitly configure sections alignment in the tests. NFC
[oota-llvm.git] / test / Object / yaml2obj-elf-symbol-basic.yaml
index 238348b9b0e198ca4ec1aacee4c28f7b4755ccb7..b17c0429bd47b664c8f3399614bfd0397025347b 100644 (file)
@@ -1,5 +1,4 @@
 # RUN: yaml2obj -format=elf %s | llvm-readobj -symbols - | FileCheck %s
-# RUN: yaml2obj -format=elf %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s --check-prefix=DISASSEMBLY
 !ELF
 FileHeader:
   Class: ELFCLASS64
@@ -10,6 +9,7 @@ Sections:
   - Name: .text
     Type: SHT_PROGBITS
     Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+    AddressAlign: 0x4
     Content: "90EBFE" # x86 machine code
                       #   NOP ; To make main's `Value` non-zero (for testing).
                       # main:
@@ -17,15 +17,14 @@ Sections:
                       # This YAML file is a valid relocatable object that,
                       # when linked and run on x86_64, will go into an
                       # infloop.
-  - Name: .symtab
-    Type: SHT_SYMTAB
-    Symbols:
-      Global:
-        - Name: main
-          Type: STT_FUNC
-          Section: .text
-          Value: 0x1
-          Size: 2
+Symbols:
+  Global:
+    - Name: main
+      Type: STT_FUNC
+      Section: .text
+      Value: 0x1
+      Size: 2
+    - Name: undefined_symbol
 
 # CHECK:      Symbols [
 # CHECK-NEXT:   Symbol {
@@ -37,7 +36,6 @@ Sections:
 # CHECK:          Binding: Global
 # CHECK-NEXT:     Type: Function
 # CHECK:          Section: .text
-
-# DISASSEMBLY:      Disassembly of section .text:
-# DISASSEMBLY-NEXT: main:
-# DISASSEMBLY-NEXT:        1:       jmp     -2
+# CHECK:        Symbol {
+# CHECK:          Name: undefined_symbol
+# CHECK:          Section: Undefined (0x0)