aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-10-25 09:54:01 +0000
committerNick Clifton <nickc@redhat.com>2008-10-25 09:54:01 +0000
commitfb6cee9639dd5333e46da33c437af90c55302ba9 (patch)
tree11f6190934fcae25dee92cde33d204fa1b78f1b6 /ld/ldlang.c
parentbbe2ba601d37a94408f5783549352571b1b87675 (diff)
downloadgdb-fb6cee9639dd5333e46da33c437af90c55302ba9.zip
gdb-fb6cee9639dd5333e46da33c437af90c55302ba9.tar.gz
gdb-fb6cee9639dd5333e46da33c437af90c55302ba9.tar.bz2
PR 6945
* ldlang.c (lang_size_sections_1): Do not update the VMAs of output sections when performing a relocatable link on COFF objects.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 322ce5b..9fd26a9 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4626,7 +4626,12 @@ lang_size_sections_1
os->name, (unsigned long) (newdot - savedot));
}
- bfd_set_section_vma (0, os->bfd_section, newdot);
+ /* PR 6945: Do not update the vma's of output sections
+ when performing a relocatable link on COFF objects. */
+ if (! link_info.relocatable
+ || (bfd_get_flavour (link_info.output_bfd)
+ != bfd_target_coff_flavour))
+ bfd_set_section_vma (0, os->bfd_section, newdot);
os->bfd_section->output_offset = 0;
}