File: undef-broken-debug.test

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (74 lines) | stat: -rw-r--r-- 2,418 bytes parent folder | download | duplicates (25)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# REQUIRES: x86
# RUN: yaml2obj %s -o %t.o
# RUN: not ld.lld %t.o -o /dev/null

# The debug info has a broken relocation. Check that we don't crash.

# We used to dereference null Target in DWARF.cpp:findAux while reporting a duplicate symbol error,
# because Target wasn't initialized yet.
# RUN: not ld.lld %t.o %t.o -o /dev/null

--- !ELF
FileHeader:
  Class:           ELFCLASS64
  Data:            ELFDATA2LSB
  Type:            ET_REL
  Machine:         EM_X86_64
Sections:
  - Name:            .text
    Type:            SHT_PROGBITS
    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]
    Content:         '0000000000000000'
  - Name:            .rela.text
    Type:            SHT_RELA
    AddressAlign:    8
    Link:            .symtab
    Info:            .text
    Relocations:
      - Symbol:      bar
        Type:        R_X86_64_64
  - Name:            .debug_line
    Type:            SHT_PROGBITS
    Content:         3300000002001C0000000101FB0E0D000101010100000001000001006162632E7300000000000009020000000000000000140208000101
  - Name:            .rela.debug_line
    AddressAlign:    8
    Type:            SHT_RELA
    Link:            .symtab
    Info:            .debug_line
    Relocations:
      - Offset:          0x0000000000000029
        Symbol:          bar
        Type:            R_X86_64_64
  - Name:            .debug_info
    Type:            SHT_PROGBITS
    AddressAlign:    0x0000000000000001
    Content:         0C000000040000000000080100000000
  - Name:            .rela.debug_info
    Type:            SHT_RELA
    Link:            .symtab
    AddressAlign:    0x0000000000000008
    Info:            .debug_info
    Relocations:
      - Offset:          0x0000000000000006
        Symbol:          .debug_abbrev
        Type:            R_X86_64_32
      - Offset:          0x000000000000000C
        Symbol:          .debug_line
        Type:            R_X86_64_32
  - Name:            .debug_abbrev
    Type:            SHT_PROGBITS
    AddressAlign:    0x0000000000000001
    Content:         '0111001017000000'

Symbols:
  - Name:            .debug_abbrev
    Type:            STT_SECTION
    Section:         .debug_abbrev
  - Name:            .debug_line
    Type:            STT_SECTION
    Section:         .debug_line
  - Name:            _start
    Section:         .text
    Binding:         STB_GLOBAL 
  - Name:            bar
    Binding:         STB_GLOBAL