aboutsummaryrefslogtreecommitdiff
path: root/ld/ldsym.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldsym.c')
-rw-r--r--ld/ldsym.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ld/ldsym.c b/ld/ldsym.c
index 65c95a6..1070713 100644
--- a/ld/ldsym.c
+++ b/ld/ldsym.c
@@ -474,14 +474,15 @@ write_file_locals (output_buffer)
if (p->section == 0)
p->section = &bfd_abs_section;
- if (flag_is_global (p->flags))
+ if (flag_is_global (p->flags)
+ || flag_is_weak (p->flags))
{
- /* We are only interested in outputting
- globals at this stage in special circumstances */
+ /* If this symbol is marked as occurring now, rather than
+ at the end, output it now. This is used for COFF C_EXT
+ FCN symbols. FIXME: There must be a better way. */
if (bfd_asymbol_bfd (p) == entry->the_bfd
&& flag_is_not_at_end (p->flags))
{
- /* And this is one of them */
*(output_buffer++) = p;
p->flags |= BSF_KEEP;
}