From f97b9cb853d19427d84a9a65716a9e049d4c480a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 18 Jun 2003 00:30:04 +0000 Subject: bfd/ 2003-06-17 H.J. Lu * section.c (struct sec): Put back kept_section. (STD_SECTION): Put back kept_section initialization. * bfd-in2.h: Regenerate. * elflink.h (elf_link_input_bfd): Also check discarded linkonce sections for relocateable output. Use kept_section to preserve debug information discarded by linkonce. ld/ 2003-06-17 H.J. Lu * ldlang.c (section_already_linked): Put back assignment of kept_section. --- ld/ChangeLog | 5 +++++ ld/ldlang.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 11811de..dcc5a56 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2003-06-17 H.J. Lu + + * ldlang.c (section_already_linked): Put back assignment of + kept_section. + 2003-06-17 Rainer Keuchel * pe-dll.c (generate_reloc): Catch and ignore an ARM_26D diff --git a/ld/ldlang.c b/ld/ldlang.c index fccab0d..83d43b8 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -1089,8 +1089,11 @@ section_already_linked (abfd, sec, data) /* Set the output_section field so that lang_add_section does not create a lang_input_section structure for this - section. */ + section. Since there might be a symbol in the section + being discarded, we must retain a pointer to the section + which we are really going to use. */ sec->output_section = bfd_abs_section_ptr; + sec->kept_section = l->sec; if (flags & SEC_GROUP) bfd_discard_group (abfd, sec); -- cgit v1.1