This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
PATCH: PE linker: Don't merge sections until final link
- To: binutils at sourceware dot cygnus dot com
- Subject: PATCH: PE linker: Don't merge sections until final link
- From: Andrew Haley <aph at pasanda dot cygnus dot co dot uk>
- Date: 22 Sep 1999 12:55:34 -0000
This patch fixes a problem which prevents C++ programs with default
constructors being partially linked on PE systems such as Cygwin32.
Its effect is to defer all merging of sections called .text$* (or
.data$*, or whatever) until relocation is performed.
Andrew.
1999-09-22 Andrew Haley <aph@cygnus.com>
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Defer
merging sections when not relocating.
Index: pe.em
===================================================================
RCS file: /cvs/binutils/binutils/ld/emultempl/pe.em,v
retrieving revision 1.14
diff -p -r1.14 pe.em
*** pe.em 1999/09/14 22:19:55 1.14
--- pe.em 1999/09/22 12:50:51
*************** gld_${EMULATION_NAME}_place_orphan (file
*** 1028,1036 ****
hold_section = s;
hold_section_name = xstrdup (secname);
! dollar = strchr (hold_section_name, '$');
! if (dollar != NULL)
! *dollar = '\0';
hold_use = NULL;
lang_for_each_statement (gld${EMULATION_NAME}_place_section);
--- 1028,1039 ----
hold_section = s;
hold_section_name = xstrdup (secname);
! if (!link_info.relocateable)
! {
! dollar = strchr (hold_section_name, '$');
! if (dollar != NULL)
! *dollar = '\0';
! }
hold_use = NULL;
lang_for_each_statement (gld${EMULATION_NAME}_place_section);