llvm-project/lld/test/elf/shndx.test

19 lines
651 B
Plaintext

Test that we can handle shndx. The test file has a shndx despite having only
a few sections. One might consider it invalid, but it has a clear interpretation
and avoids needing 65K sections to test the corresponding code path.
RUN: lld -target x86_64-pc-linux -flavor gnu %p/Inputs/shndx.o-x86_64 -o %t.so -shared
RUN: llvm-readobj -s -t %t.so | FileCheck %s
CHECK: Name: .text
CHECK-NEXT: Type: SHT_PROGBITS (0x1)
CHECK-NEXT: Flags [ (0x6)
CHECK-NEXT: SHF_ALLOC (0x2)
CHECK-NEXT: SHF_EXECINSTR (0x4)
CHECK-NEXT: ]
CHECK-NEXT: Address: [[ADDR:.*]]
// CHECK: Symbol {
// CHECK: Name: foo
// CHECK-NEXT: Value: [[ADDR]]