brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · f863f36 Raw
84 lines · plain
1## Check we don't suggest alternative spelling for relocations to symbols2## defined in discarded sections.3 4# RUN: yaml2obj %s -o %t.o5# RUN: not ld.lld %t.o %t.o -o /dev/null 2>&1 | FileCheck %s6 7# CHECK-NOT: did you mean:8 9--- !ELF10FileHeader:11  Class:   ELFCLASS6412  Data:    ELFDATA2LSB13  Type:    ET_REL14  Machine: EM_X86_6415Sections:16  - Name: .group17    Type: SHT_GROUP18    Link: .symtab19    Info: foo20    Members:21      - SectionOrType: GRP_COMDAT22      - SectionOrType: .text.foo23  - Name:  .text.foo24    Type:  SHT_PROGBITS25    Flags: [ SHF_ALLOC, SHF_EXECINSTR, SHF_GROUP ]26  - Name:  .rodata27    Type:  SHT_PROGBITS28    Flags: [ SHF_ALLOC ]29  - Name: .rela.rodata30    Type: SHT_RELA31    Link: .symtab32    Info: .rodata33    Relocations:34      ## Relocation which references ".text.foo". Check we don't suggest the35      ## section symbol for ".data", which has an empty name.36      - Type:   R_X86_64_6437        ## .text.foo38        Symbol: 139      ## Relocation which references "foo". Check we don't suggest "for".40      - Type:   R_X86_64_6441        Symbol: foo42  - Name: .data43    Type: SHT_PROGBITS44Symbols:45  - Name:    ""46    Type:    STT_SECTION47    Section: .text.foo48  - Name:    ""49    Type:    STT_SECTION50    Section: .data51  - Name:    foo52    Section: .text.foo53    Binding: STB_GLOBAL54  - Name:    for55    Section: .data56 57## Check we don't suggest an empty name symbol (e.g. STT_SECTION).58 59# RUN: yaml2obj --docnum=2 %s -o %t2.o60# RUN: not ld.lld %t2.o -o /dev/null 2>&1 | FileCheck %s61 62--- !ELF63FileHeader:64  Class:   ELFCLASS6465  Data:    ELFDATA2LSB66  Type:    ET_REL67  Machine: EM_X86_6468Sections:69  - Name:  .text70    Type:  SHT_PROGBITS71    Flags: [ SHF_ALLOC, SHF_EXECINSTR ]72  - Name: .rela.text73    Type:  SHT_RELA74    Info: .text75    Relocations:76      - Type:   R_X86_64_6477        Symbol: f78Symbols:79  - Name:    ""80    Type:    STT_SECTION81    Section: .text82  - Name:    f83    Binding: STB_GLOBAL84