2013-06-19 01:14:03 +02:00
|
|
|
# RUN: yaml2obj -format=elf %s | llvm-readobj -symbols - | FileCheck %s
|
|
|
|
!ELF
|
|
|
|
FileHeader:
|
|
|
|
Class: ELFCLASS64
|
|
|
|
Data: ELFDATA2LSB
|
|
|
|
Type: ET_REL
|
|
|
|
Machine: EM_X86_64
|
|
|
|
Sections:
|
|
|
|
- Name: .text
|
|
|
|
Type: SHT_PROGBITS
|
|
|
|
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
|
2013-06-22 01:17:10 +02:00
|
|
|
Content: "90EBFE" # x86 machine code
|
|
|
|
# NOP ; To make main's `Value` non-zero (for testing).
|
|
|
|
# main:
|
|
|
|
# JMP -2 ; (infloop)
|
|
|
|
# This YAML file is a valid relocatable object that,
|
|
|
|
# when linked and run on x86_64, will go into an
|
|
|
|
# infloop.
|
2013-06-22 03:38:00 +02:00
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: main
|
|
|
|
Type: STT_FUNC
|
|
|
|
Section: .text
|
|
|
|
Value: 0x1
|
|
|
|
Size: 2
|
|
|
|
- Name: undefined_symbol
|
2013-06-19 01:14:03 +02:00
|
|
|
|
|
|
|
# CHECK: Symbols [
|
|
|
|
# CHECK-NEXT: Symbol {
|
|
|
|
# CHECK-NEXT: Name: (0)
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK-NEXT: Name: main
|
2013-06-22 01:17:10 +02:00
|
|
|
# CHECK-NEXT: Value: 0x1
|
|
|
|
# CHECK-NEXT: Size: 2
|
2013-06-19 02:11:59 +02:00
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK-NEXT: Type: Function
|
2013-06-20 22:59:41 +02:00
|
|
|
# CHECK: Section: .text
|
2013-06-21 03:11:48 +02:00
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: undefined_symbol
|
|
|
|
# CHECK: Section: (0x0)
|