mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 10:00:51 +00:00
Fix some dlx fails
Generic linker ELF targets using CREATE_OBJECT_SYMBOLS in their scripts run into a problem. The file symbols are created by _bfd_generic_link_output_symbols in each object file, in the section corresponding to the CREATE_OBJECT_SYMBOLS section, typically .text. If it so happens that the output .text section is stripped due to being empty, then elf.c:assign_section_numbers won't assign an ELF section number and swap_out_syms will report "unable to find equivalent output section" for the object symbols. Fix this by always keeping an output section with CREATE_OBJECT_SYMBOLS. * ldlang.c (lang_size_sections_1): Set SEC_KEEP on create_object_symbols_section. * testsuite/ld-elf/pr22319.d: Don't xfail dlx.
This commit is contained in:
@@ -5619,8 +5619,9 @@ lang_size_sections_1
|
||||
break;
|
||||
|
||||
case lang_object_symbols_statement_enum:
|
||||
link_info.create_object_symbols_section =
|
||||
output_section_statement->bfd_section;
|
||||
link_info.create_object_symbols_section
|
||||
= output_section_statement->bfd_section;
|
||||
output_section_statement->bfd_section->flags |= SEC_KEEP;
|
||||
break;
|
||||
|
||||
case lang_output_statement_enum:
|
||||
|
||||
Reference in New Issue
Block a user