- 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:
# 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
- - Name: undefined_symbol
+Symbols:
+ Global:
+ - Name: main
+ Type: STT_FUNC
+ Section: .text
+ Value: 0x1
+ Size: 2
+ - Name: undefined_symbol
# CHECK: Symbols [
# CHECK-NEXT: Symbol {
# CHECK: Section: .text
# CHECK: Symbol {
# CHECK: Name: undefined_symbol
-# CHECK: Section: (0x0)
-
-# How to conditionalize on X86 being present?
-# yaml2obj -format=elf %s | llvm-objdump -d -no-show-raw-insn - | FileCheck %s --check-prefix=DISASSEMBLY
-# DISASSEMBLY: Disassembly of section .text:
-# DISASSEMBLY-NEXT: main:
-# DISASSEMBLY-NEXT: 1: jmp -2
+# CHECK: Section: Undefined (0x0)