diff options
author | Alan Modra <amodra@gmail.com> | 2009-10-09 05:19:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2009-10-09 05:19:37 +0000 |
commit | fd68d03d9244a426ca1ddd902e8f5e3d4a2e7c64 (patch) | |
tree | 90e9b7db8ea7e4889f983eaa9cb5b529cda4595e /ld/ldlang.c | |
parent | 79e314681214f07a627b172220ac49e1640ffe54 (diff) | |
download | gdb-fd68d03d9244a426ca1ddd902e8f5e3d4a2e7c64.zip gdb-fd68d03d9244a426ca1ddd902e8f5e3d4a2e7c64.tar.gz gdb-fd68d03d9244a426ca1ddd902e8f5e3d4a2e7c64.tar.bz2 |
PR ld/10749
* ldlang.c (lang_size_sections_1): Zero section vmas only for COFF.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index f1daeb5..898ec05 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -4665,7 +4665,13 @@ lang_size_sections_1 lang_memory_region_type *r; os = &s->output_section_statement; - if (os->addr_tree == NULL && link_info.relocatable) + /* FIXME: We shouldn't need to zero section vmas for ld -r + here, in lang_insert_orphan, or in the default linker scripts. + This is covering for coff backend linker bugs. See PR6945. */ + if (os->addr_tree == NULL + && link_info.relocatable + && (bfd_get_flavour (link_info.output_bfd) + == bfd_target_coff_flavour)) os->addr_tree = exp_intop (0); if (os->addr_tree != NULL) { |