Discussion:
[Bug gold/15861] New: internal error in set_info_section, at output.h:3039 when using linker script
jan.smets@alcatel-lucent.com
2013-08-20 14:15:36 UTC
Permalink
http://sourceware.org/bugzilla/show_bug.cgi?id=15861

Bug ID: 15861
Summary: internal error in set_info_section, at output.h:3039
when using linker script
Product: binutils
Version: 2.23
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ian at airs dot com
Reporter: ***@alcatel-lucent.com
CC: ccoutant at google dot com

ld.gold -T ../make/link_script_46_x86_64_rel -X -N -r --fatal-warnings -o
../lib/something.a ../objs/file.o
ld.gold: internal error in set_info_section, at output.h:3039

The linker script can be found at http://paste.ubuntu.com/6006534/ and is very
similar to the default bfd link script.

The object file looks like this:

ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: REL (Relocatable file)
Machine: Advanced Micro Devices X86-64
Version: 0x1
Entry point address: 0x0
Start of program headers: 0 (bytes into file)
Start of section headers: 296 (bytes into file)
Flags: 0x0
Size of this header: 64 (bytes)
Size of program headers: 0 (bytes)
Number of program headers: 0
Size of section headers: 64 (bytes)
Number of section headers: 12
Section header string table index: 9

Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .text PROGBITS 0000000000000000 00000040
000000000000000b 0000000000000000 AX 0 0 16
[ 2] .rela.text RELA 0000000000000000 00000540
0000000000000018 0000000000000018 10 1 8
[ 3] .data PROGBITS 0000000000000000 00000050
0000000000000008 0000000000000000 WA 0 0 8
[ 4] .rela.data RELA 0000000000000000 00000558
0000000000000018 0000000000000018 10 3 8
[ 5] .bss NOBITS 0000000000000000 00000058
0000000000000000 0000000000000000 WA 0 0 4
[ 6] .rodata.str1.1 PROGBITS 0000000000000000 00000058
000000000000000d 0000000000000001 AMS 0 0 1
[ 7] .rodata.str1.8 PROGBITS 0000000000000000 00000068
0000000000000027 0000000000000001 AMS 0 0 8
[ 8] .comment PROGBITS 0000000000000000 0000008f
0000000000000039 0000000000000001 MS 0 0 1
[ 9] .shstrtab STRTAB 0000000000000000 000000c8
000000000000005d 0000000000000000 0 0 1
[10] .symtab SYMTAB 0000000000000000 00000428
00000000000000f0 0000000000000018 11 8 8
[11] .strtab STRTAB 0000000000000000 00000518
0000000000000026 0000000000000000 0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)

There are no section groups in this file.

There are no program headers in this file.

Relocation section '.rela.text' at offset 0x540 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
000000000002 00050000000a R_X86_64_32 0000000000000000 .rodata.str1.1 +
0
Relocation section '.rela.data' at offset 0x558 contains 1 entries:
Offset Info Type Sym. Value Sym. Name +
Addend
000000000000 000600000001 R_X86_64_64 0000000000000000 .rodata.str1.8 +
0

There are no unwind sections in this file.

Symbol table '.symtab' contains 10 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS misc.c
2: 0000000000000000 0 SECTION LOCAL DEFAULT 1
3: 0000000000000000 0 SECTION LOCAL DEFAULT 3
4: 0000000000000000 0 SECTION LOCAL DEFAULT 5
5: 0000000000000000 0 SECTION LOCAL DEFAULT 6
6: 0000000000000000 0 SECTION LOCAL DEFAULT 7
7: 0000000000000000 0 SECTION LOCAL DEFAULT 8
8: 0000000000000000 11 FUNC GLOBAL DEFAULT 1 _options
9: 0000000000000000 8 OBJECT GLOBAL DEFAULT 3 _version

No version information found in this file.


Binutils 2.23.2 (gold 1.11)



==========================


Also, I used a wrong link script (for non relocatable output) by mistake first,
with the -r option, which segfaulted GOLD. This may be a totally different
issue.
Program received signal SIGSEGV, Segmentation fault.
gold::Layout::layout_reloc<64, false> (this=0x7fffffffd200, object=0x908ff0,
shdr=..., data_section=0x909920, rr=0x95eb20) at layout.cc:1132
1132 os->set_should_link_to_symtab();
(gdb) bt
#0 gold::Layout::layout_reloc<64, false> (this=0x7fffffffd200,
object=0x908ff0, shdr=..., data_section=0x909920, rr=0x95eb20) at
layout.cc:1132
#1 0x000000000053cf85 in gold::Sized_relobj_file<64, false>::do_layout
(this=0x908ff0, symtab=0x9091c0, layout=0x7fffffffd200, sd=0x9092d0) at
object.cc:1656
#2 0x000000000059ae48 in layout (this=0x9094b0) at object.h:570
#3 gold::Add_symbols::run (this=0x9094b0) at readsyms.cc:634
#4 0x00000000005ed9d4 in gold::Workqueue::find_and_run_task
(this=0x7fffffffdba0, thread_number=0) at workqueue.cc:319
#5 0x00000000005edd3a in gold::Workqueue::process (this=0x7fffffffdba0,
thread_number=0) at workqueue.cc:495
#6 0x00000000004055d6 in main (argc=10, argv=0x7fffffffdda8) at main.cc:252
--
You are receiving this mail because:
You are on the CC list for the bug.
alec.theriault at gmail dot com
2018-05-10 02:34:55 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=15861

Alec <alec.theriault at gmail dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |alec.theriault at gmail dot com
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...