This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/3249: Msg "multiple definition of" with "-feliminate-dwarf2_dups" involvement
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Sat, 23 Sep 2006 17:08:38 -0700
- Subject: PATCH: PR ld/3249: Msg "multiple definition of" with "-feliminate-dwarf2_dups" involvement
For relocatable link, we shouldn't combine any .gnu.linkonce. sections
with regular sections. We missed gnu.linkonce.d.*personality.* and
.gnu.linkonce.wi.*. This patch fixes them.
H.J.
---
2006-09-23 H.J. Lu <hongjiu.lu@intel.com>
PR ld/3249
* scripttempl/elf.sc: Don't combine .gnu.linkonce.d.*personality*
and .gnu.linkonce.wi.* sections with .data and .debug_info for
relocatable link.
--- ld/scripttempl/elf.sc.linkonce 2006-08-27 18:52:56.000000000 -0700
+++ ld/scripttempl/elf.sc 2006-09-23 17:00:33.000000000 -0700
@@ -420,7 +420,7 @@ cat <<EOF
{
${RELOCATING+${DATA_START_SYMBOLS}}
*(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
- KEEP (*(.gnu.linkonce.d.*personality*))
+ ${RELOCATING+KEEP (*(.gnu.linkonce.d.*personality*))}
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
.data1 ${RELOCATING-0} : { *(.data1) }
@@ -486,7 +486,7 @@ cat <<EOF
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }