aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorChristopher Faylor <me+cygwin@cgf.cx>2009-09-27 16:08:34 +0000
committerChristopher Faylor <me+cygwin@cgf.cx>2009-09-27 16:08:34 +0000
commiteceda120cd420689231483412fdebc32158d79c7 (patch)
tree092b6417b18cae9bb969b9186583b352e46eb497 /ld/ldlang.c
parent5b6912fbdbc8f9640728799661010fc080fe2e53 (diff)
downloadgdb-eceda120cd420689231483412fdebc32158d79c7.zip
gdb-eceda120cd420689231483412fdebc32158d79c7.tar.gz
gdb-eceda120cd420689231483412fdebc32158d79c7.tar.bz2
* ldlang.c (lang_size_sections_1): Always force output vma to zero for
relocatable sections. (lang_size_sections_1): Revert previous COFF-only accommodation for relocatable sections.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index e9f032e..9e956b3 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -4665,6 +4665,8 @@ lang_size_sections_1
lang_memory_region_type *r;
os = &s->output_section_statement;
+ if (link_info.relocatable)
+ os->addr_tree = exp_intop (0);
if (os->addr_tree != NULL)
{
os->processed_vma = FALSE;
@@ -4789,12 +4791,7 @@ lang_size_sections_1
os->name, (unsigned long) (newdot - savedot));
}
- /* 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);
+ bfd_set_section_vma (0, os->bfd_section, newdot);
os->bfd_section->output_offset = 0;
}