[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/25968] plugin_test_1 fails when --gc-sections is on by default
From: |
i at maskray dot me |
Subject: |
[Bug gold/25968] plugin_test_1 fails when --gc-sections is on by default |
Date: |
Sun, 04 Sep 2022 07:00:41 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=25968
Fangrui Song <i at maskray dot me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i at maskray dot me
--- Comment #1 from Fangrui Song <i at maskray dot me> ---
--emit-relocs + (--gc-sections || --icf) triggers an assertion failure.
--emit-relocs --icf failure is reported as PR18845.
% echo 'void foo(){}' | gcc -xc - -c -o a.o
% gold --emit-relocs --gc-sections a.o
gold: internal error in do_layout, at ../../gold/object.cc:1939
Simply commenting out the assert will lead to a segfault along the road.
diff --git i/gold/object.cc w/gold/object.cc
index fe2494d3c41..9ba444f79d0 100644
--- i/gold/object.cc
+++ w/gold/object.cc
@@ -1936,7 +1936,7 @@ Sized_relobj_file<size,
big_endian>::do_layout(Symbol_table* symtab,
if (emit_relocs)
this->size_relocatable_relocs();
- gold_assert(!is_two_pass || reloc_sections.empty());
+ //gold_assert(!is_two_pass || reloc_sections.empty());
for (std::vector<unsigned int>::const_iterator p = reloc_sections.begin();
p != reloc_sections.end();
(gdb) up
#1 0x0000555555b7c8bd in gold::Layout::layout_reloc<64, false>
(this=0x7fffffff32d0, shdr=..., data_section=0x1, rr=0x555555d80630) at
../../../gold/layout.cc:1341
1341 name += data_section->name();
(gdb) p data_section
$1 = (gold::Output_section *) 0x1
(gdb) bt
#0 0x0000555555965b78 in gold::Output_section::name (this=0x1) at
../../../gold/output.h:3258
#1 0x0000555555b7c8bd in gold::Layout::layout_reloc<64, false>
(this=0x7fffffff32d0, shdr=..., data_section=0x1, rr=0x555555d80630) at
../../../gold/layout.cc:1341
#2 0x0000555555bb9236 in gold::Sized_relobj_file<64, false>::do_layout
(this=0x555555d90490, symtab=0x7fffffff37b0, layout=0x7fffffff32d0,
sd=0x555555d906c0) at ../../../gold/object.cc:1982
#3 0x0000555555ab58bc in gold::Object::layout (this=0x555555d90490,
symtab=0x7fffffff37b0, layout=0x7fffffff32d0, sd=0x555555d906c0) at
../../../gold/object.h:696
#4 0x0000555555c5d3c8 in gold::Add_symbols::run (this=0x555555d7ffe0) at
../../../gold/readsyms.cc:634
#5 0x0000555555ceb27b in gold::Workqueue::find_and_run_task
(this=0x7fffffff3cb0, thread_number=0) at ../../../gold/workqueue.cc:319
#6 0x0000555555ceb8b1 in gold::Workqueue::process (this=0x7fffffff3cb0,
thread_number=0) at ../../../gold/workqueue.cc:495
#7 0x00005555557e6a80 in main (argc=4, argv=0x7fffffffd5d8) at
../../../gold/main.cc:252
(gdb)
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gold/25968] plugin_test_1 fails when --gc-sections is on by default,
i at maskray dot me <=