From 1e7fef1d44576ea9ca318fe51640dd92c7bbb928 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Thu, 8 Jan 2004 16:46:56 +0000 Subject: [PATCH] (coff_arm_relocate_section): Do not alter relocs that are not partial_inplace during a relocatable link. --- bfd/ChangeLog | 5 +++++ bfd/coff-arm.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3bf3ed2a0bf..94aa94de2e0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2004-01-08 Dmitry Semyonov + + * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that + are not partial_inplace during a relocatable link. + 2004-01-08 Kazu Hirata * elf32-m68k.c (elf_m68k_gc_sweep_hook): Terminate early diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c index 9b2612327f8..79bae59a726 100644 --- a/bfd/coff-arm.c +++ b/bfd/coff-arm.c @@ -1734,10 +1734,13 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section, #endif else #endif /* THUMBEXTENSION */ - rstat = _bfd_final_link_relocate (howto, input_bfd, input_section, - contents, - rel->r_vaddr - input_section->vma, - val, addend); + if (info->relocatable && ! howto->partial_inplace) + rstat = bfd_reloc_ok; + else + rstat = _bfd_final_link_relocate (howto, input_bfd, input_section, + contents, + rel->r_vaddr - input_section->vma, + val, addend); #if 1 /* THUMBEXTENSION */ /* FIXME: Is this the best way to fix up thumb addresses? krk@cygnus.com -- 2.30.2