aboutsummaryrefslogtreecommitdiff
path: root/bfd/linker.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-01-27 18:56:42 +0000
committerIan Lance Taylor <ian@airs.com>1994-01-27 18:56:42 +0000
commitc315696657d36cfab52129f14ff12436c8aa861d (patch)
treed78d3fb56ce0607261ee61d7b0f2641f64905281 /bfd/linker.c
parent4a5242e884dec6efa9730f8ee0ccb57c4d9bca68 (diff)
downloadgdb-c315696657d36cfab52129f14ff12436c8aa861d.zip
gdb-c315696657d36cfab52129f14ff12436c8aa861d.tar.gz
gdb-c315696657d36cfab52129f14ff12436c8aa861d.tar.bz2
* linker.c (generic_link_add_symbol_list): If symbol is common,
set the BSF_OLD_COMMON flag.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r--bfd/linker.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/linker.c b/bfd/linker.c
index 2f3ac82..f70f799 100644
--- a/bfd/linker.c
+++ b/bfd/linker.c
@@ -1066,7 +1066,14 @@ generic_link_add_symbol_list (abfd, info, symbol_count, symbols)
|| (bfd_get_section (p) != &bfd_und_section
&& (! bfd_is_com_section (bfd_get_section (p))
|| (bfd_get_section (h->sym) == &bfd_und_section))))
- h->sym = p;
+ {
+ h->sym = p;
+ /* BSF_OLD_COMMON is a hack to support COFF reloc
+ reading, and it should go away when the COFF
+ linker is switched to the new version. */
+ if (bfd_is_com_section (bfd_get_section (p)))
+ p->flags |= BSF_OLD_COMMON;
+ }
}
}
}