2013-06-18 23:14:03 +00: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-21 23:17:10 +00: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 01:38:00 +00:00
|
|
|
Symbols:
|
|
|
|
Global:
|
|
|
|
- Name: main
|
|
|
|
Type: STT_FUNC
|
|
|
|
Section: .text
|
|
|
|
Value: 0x1
|
|
|
|
Size: 2
|
|
|
|
- Name: undefined_symbol
|
2013-06-18 23:14:03 +00:00
|
|
|
|
|
|
|
# CHECK: Symbols [
|
|
|
|
# CHECK-NEXT: Symbol {
|
|
|
|
# CHECK-NEXT: Name: (0)
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK-NEXT: Name: main
|
2013-06-21 23:17:10 +00:00
|
|
|
# CHECK-NEXT: Value: 0x1
|
|
|
|
# CHECK-NEXT: Size: 2
|
2013-06-19 00:11:59 +00:00
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK-NEXT: Type: Function
|
2013-06-20 20:59:41 +00:00
|
|
|
# CHECK: Section: .text
|
2013-06-21 01:11:48 +00:00
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: undefined_symbol
|
2014-03-24 05:00:34 +00:00
|
|
|
# CHECK: Section: Undefined (0x0)
|