This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch ld]: Fix for PR 14326 - Cannot link to etext symbol in scripttempl/pe.sc
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: Binutils <binutils at sourceware dot org>
- Cc: Nick Clifton <nickc at redhat dot com>
- Date: Wed, 15 Aug 2012 22:14:07 +0200
- Subject: [patch ld]: Fix for PR 14326 - Cannot link to etext symbol in scripttempl/pe.sc
Hi,
This patch adds symbol '_etext' to pe.sc's linker script, so that the
variable 'etext' can be accessed from C/C++.
2012-08-15 Kai Tietz
PR ld/14326
* scripttempl/pe.sc: Add _etext symbol.
Ok for apply?
Regards,
Kai
Index: scripttempl/pe.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/pe.sc,v
retrieving revision 1.30
diff -u -r1.30 pe.sc
--- scripttempl/pe.sc 7 Aug 2012 13:47:17 -0000 1.30
+++ scripttempl/pe.sc 15 Aug 2012 20:10:37 -0000
@@ -86,6 +86,7 @@
/* ??? Why is .gcc_exc here? */
${RELOCATING+ *(.gcc_exc)}
${RELOCATING+PROVIDE (etext = .);}
+ ${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+ *(.gcc_except_table)}
}