• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
3# RUN: yaml2obj %s -o %t.o
4# RUN: ld.lld %t.o -o /dev/null --entry 0 --fatal-warnings
5
6## This is for https://bugs.llvm.org//show_bug.cgi?id=34852. GCC 8.0 or
7## earlier have a bug which creates non-absolute R_386_GOTPC relocations
8## in non-allocated sections. It is illegal, but we want to make sure that
9## lld skips them instead of reporting errors.
10
11--- !ELF
12FileHeader:
13  Class:           ELFCLASS32
14  Data:            ELFDATA2LSB
15  Type:            ET_REL
16  Machine:         EM_386
17Sections:
18  - Name:            .debug_info
19    Type:            SHT_PROGBITS
20    AddressAlign:    0x0000000000000001
21    Content:         0000000000000000
22  - Name:            .rel.debug_info
23    Type:            SHT_REL
24    Link:            .symtab
25    AddressAlign:    0x0000000000000004
26    Info:            .debug_info
27    Relocations:
28      - Offset:          0x000000000000041F
29        Symbol:          _GLOBAL_OFFSET_TABLE_
30        Type:            R_386_GOTPC
31Symbols:
32  - Name:            _GLOBAL_OFFSET_TABLE_
33    Binding:         STB_GLOBAL
34