diff --git a/ld/ChangeLog b/ld/ChangeLog index 9000cabf9d..4fe6889efa 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2019-03-21 Alan Modra + + * ldlang.c (lang_size_sections_1): Set SEC_KEEP on + create_object_symbols_section. + * testsuite/ld-elf/pr22319.d: Don't xfail dlx. + 2019-03-18 Alan Modra * testsuite/ld-elf/merge.d: Remove csky from xfails, add moxie. diff --git a/ld/ldlang.c b/ld/ldlang.c index 33f6bda292..77d890eb70 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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: diff --git a/ld/testsuite/ld-elf/pr22319.d b/ld/testsuite/ld-elf/pr22319.d index 8ad2f3e90d..f5413f09fd 100644 --- a/ld/testsuite/ld-elf/pr22319.d +++ b/ld/testsuite/ld-elf/pr22319.d @@ -1,8 +1,6 @@ #name: PR 22319 - required undefined symbols in output #ld: -u undefined_symbol -e 0 #nm: -u -#xfail: dlx-*-* -# The DLX target fails because it needs a special linker script to handle file symbols. [ ]+U+[ ]+undefined_symbol #pass