Files
clang-p2996/lld/test/ELF/invalid/invalid-relocation-arm.test
Fangrui Song cebb0a64b4 [ELF][ARM] Improve error message for unknown relocation
Like rLLD354040.

Before: `error: unrecognized relocation Unknown (254)`
Now:    `error: unknown relocation (254) against symbol foo`
2021-11-08 12:39:08 -08:00

30 lines
650 B
Plaintext

# REQUIRES: arm
# RUN: yaml2obj %s -o %t.o
# RUN: not ld.lld %t.o -o /dev/null 2>&1 | FileCheck %s
# CHECK: error: unknown relocation (254) against symbol foo
# CHECK-NEXT: error: unknown relocation (255) against symbol foo
!ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_ARM
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
- Name: .rela.text
Type: SHT_RELA
Link: .symtab
Info: .text
Relocations:
- Symbol: foo
Type: 0xfe
- Symbol: foo
Type: 0xff
Symbols:
- Name: foo
Section: .text
Binding: STB_GLOBAL