From 0814be7d69f8c15cdb3f9c441f0367b52fb1320e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 23 Sep 2010 11:40:06 +0000 Subject: [PATCH] ld/ * ldlang.c (lang_add_section): Don't copy SEC_RELOC from input to output section on a final link. bfd/ * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC difference between input and output section. --- bfd/ChangeLog | 9 +++++++-- bfd/elf.c | 2 +- ld/ChangeLog | 5 +++++ ld/ldlang.c | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 56e2f12d286..95d4672841b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-09-23 Alan Modra + + * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC + difference between input and output section. + 2010-09-22 Kai Tietz * coffcode.h (sec_to_styp_flags): Adjust debug @@ -5,8 +10,8 @@ and avoid marking them as excluded. (styp_to_sec_flags): Doing reverse mapping. - * peXXigen.c (_bfd_XXi_final_link_postscript): - Add handling for setting IAT directory entry. + * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for + setting IAT directory entry. 2010-09-20 Richard Henderson diff --git a/bfd/elf.c b/bfd/elf.c index 5ec92e92b9c..fe5f19fc075 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6110,7 +6110,7 @@ _bfd_elf_init_private_section_data (bfd *ibfd, && (osec->flags == isec->flags || (final_link && ((osec->flags ^ isec->flags) - & ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)) == 0))) + & ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC)) == 0))) elf_section_type (osec) = elf_section_type (isec); /* FIXME: Is this correct for all OS/PROC specific flags? */ diff --git a/ld/ChangeLog b/ld/ChangeLog index 0f4fa436570..e7c8e774b2b 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2010-09-23 Alan Modra + + * ldlang.c (lang_add_section): Don't copy SEC_RELOC from input + to output section on a final link. + 2010-09-22 Kai Tietz * ldlang.c (lang_add_section): Allow for debugging diff --git a/ld/ldlang.c b/ld/ldlang.c index 1c386183150..36750edcd62 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -2232,7 +2232,7 @@ lang_add_section (lang_statement_list_type *ptr, to see .text with SEC_LINK_ONCE set. */ if (!link_info.relocatable) - flags &= ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES); + flags &= ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC); switch (output->sectype) { -- 2.30.2