[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/20513] GNU ld does not ignore symbols defined in sections marked
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/20513] GNU ld does not ignore symbols defined in sections marked EXCLUDE |
Date: |
Fri, 26 Aug 2016 19:59:24 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20513
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |hjl.tools at gmail dot
com
Target Milestone|--- |2.28
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This works:
diff --git a/ld/ldmain.c b/ld/ldmain.c
index e7a8dff..294c5b9 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -959,6 +959,11 @@ multiple_definition (struct bfd_link_info *info,
&& bfd_is_abs_section (nsec->output_section)))
return;
+ /* Ignore a redefinition from excluded section. */
+ if ((osec->flags & SEC_EXCLUDE) != 0
+ || (nsec->flags & SEC_EXCLUDE) != 0)
+ return;
+
name = h->root.string;
if (nbfd == NULL)
{
--
You are receiving this mail because:
You are on the CC list for the bug.