Files
clang-p2996/lld/test/ELF/invalid/invalid-debug-relocations.test
Fangrui Song e36223c85c [ELF] Enforce two dashes for Flag options not supported by GNU ld (i.e. no compatibility burden)
Announced on https://lists.llvm.org/pipermail/llvm-dev/2020-May/141416.html

Similar to D79371, but for `multiclass B` (convenience helper for defining --foo and --no-foo)

Some changed options are also used by gold, but I haven't seen their
one-dash use cases outside of lld's testsuite.
2020-05-15 11:07:25 -07:00

40 lines
1.1 KiB
Plaintext

# REQUIRES: x86
# RUN: yaml2obj %s -o %t.o
# RUN: not ld.lld --gdb-index %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: {{.*}}invalid-debug-relocations.test.tmp.o:(.debug_info+0x0): unknown relocation (255) against symbol _start
!ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_386
Sections:
- Type: SHT_PROGBITS
Name: .text
Flags: [ ]
AddressAlign: 0x04
Content: "0000"
- Type: SHT_PROGBITS
Name: .debug_info
Flags: [ ]
AddressAlign: 0x04
Content: "0000"
- Type: SHT_REL
Name: .rel.debug_info
Link: .symtab
Info: .debug_info
Relocations:
- Symbol: _start
Type: 0xFF
- Offset: 4
Symbol: _start
Type: 0xFF
Symbols:
- Name: _start
Type: STT_FUNC
Section: .text
Value: 0x0
Binding: STB_GLOBAL