brintos

brintos / llvm-project-archived public Read only

0
0
Text · 947 B · d26aa8d Raw
27 lines · plain
1# REQUIRES: x862 3# LLD used to crash when linking against a DSO with an undefined STB_LOCAL4# symbol in the global part of the dynamic symbol table (i.e. an STB_LOCAL5# symbol with an index >= the sh_info of the dynamic symbol table section). Such6# a DSO is very broken, because local symbols should precede all global symbols7# in the symbol table, and because having a symbol that's both undefined and8# STB_LOCAL is a nonsensical combination. Nevertheless, we should error on such9# input files instead of crashing.10 11# RUN: yaml2obj %s -o %t.so12# RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s13# CHECK: error: {{.*}}.so: invalid local symbol 'foo' in global part of symbol table14 15--- !ELF16FileHeader:17  Class:           ELFCLASS6418  Data:            ELFDATA2LSB19  Type:            ET_DYN20  Machine:         EM_X86_6421Sections:22  - Name:          .dynsym23    Info:          124    Type:          SHT_DYNSYM25DynamicSymbols:26  - Name: foo27