Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libwild/src/elf_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ fn write_symbols<'data>(
if let Some(section_index) = object.object.symbol_section(sym, sym_index)? {
match &object.sections[section_index.0] {
SectionSlot::Loaded(section) => section.output_section_id(),
SectionSlot::LoadedDebugInfo(section) => section.output_section_id(),
SectionSlot::MergeStrings(section) => section.part_id.output_section_id(),
SectionSlot::FrameData(..) => output_section_id::EH_FRAME,
_ => bail!(
Expand Down
1 change: 0 additions & 1 deletion wild/tests/external_tests/mold_skip_tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ tests = [
"oformat-binary.sh",
"omagic.sh",
"package-metadata.sh",
"relocatable-debug-info.sh",
"relocatable-exception.sh",
"relocatable-merge-sections.sh",
"repro.sh", # Note in this test's second half that it uses a custom environment variable called `MOLD_REPRO`. While Wild currently doesn't support `--repro`, it will eventually be moved to the "ignore" group once support is added.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//#AbstractConfig:default
//#RequiresLinkerPlugin:true
//#RequiresCompilerFlags:-flto=auto -fno-fat-lto-objects
//#DiffEnabled:false
//#RunEnabled:false
//#SkipLinker:ld

//#Config:gcc:default
//#CompArgs:-O2 -g -DRELDEBUG -flto=auto -fno-fat-lto-objects
//#Object:runtime.c
//#LinkerDriver:gcc
//#LinkArgs:-flto=auto -nostdlib -Wl,--export-dynamic -rdynamic
//#ExpectSym:debug_sym section=".debug_info"

#include "runtime.h"

int debug_sym __attribute__((used, section(".debug_info"))) = 123;

int foo() { return 42; }

void _start(void) {
runtime_init();
exit_syscall(foo());
}
1 change: 1 addition & 0 deletions wild/tests/sources/elf/relocatables/relocatables.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//#EnableLinker:lld
//#Object:runtime.c
//#CompArgs:-g
//#Relocatable:relocatable-1.c,relocatable-2.c

#include "runtime.h"
Expand Down
Loading