| 1 |
# RUN: yaml2obj %s -o %t |
| 2 |
# RUN: not llvm-objcopy -N foo %t %t2 2>&1 | FileCheck %s -DFILE=%t |
| 3 |
# RUN: yaml2obj -DTYPE=SHT_CREL %s -o %t1 |
| 4 |
# RUN: not llvm-objcopy -N foo %t1 /dev/null 2>&1 | FileCheck %s -DFILE=%t1 |
| 5 |
|
| 6 |
!ELF |
| 7 |
FileHeader: |
| 8 |
Class: ELFCLASS64 |
| 9 |
Data: ELFDATA2LSB |
| 10 |
Type: ET_REL |
| 11 |
Machine: EM_X86_64 |
| 12 |
Sections: |
| 13 |
- Name: .text |
| 14 |
Type: SHT_PROGBITS |
| 15 |
Flags: [ SHF_ALLOC, SHF_EXECINSTR ] |
| 16 |
Address: 0x1000 |
| 17 |
AddressAlign: 0x0000000000000010 |
| 18 |
Size: 64 |
| 19 |
- Name: .rel.text |
| 20 |
Type: [[TYPE=SHT_REL]] |
| 21 |
Info: .text |
| 22 |
Relocations: |
| 23 |
- Offset: 0x1000 |
| 24 |
Symbol: foo |
| 25 |
Type: R_X86_64_PC32 |
| 26 |
Symbols: |
| 27 |
- Name: foo |
| 28 |
Type: STT_FUNC |
| 29 |
Section: .text |
| 30 |
Value: 0x1000 |
| 31 |
Size: 8 |
| 32 |
|
| 33 |
# CHECK: error: '[[FILE]]': not stripping symbol 'foo' because it is named in a relocation |