This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[GOLD][PATCH] predefined segment symbol _begin
- From: Viktor Kutuzov <vkutuzov at accesssoftek dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Wed, 10 Feb 2010 15:06:02 -0800
- Subject: [GOLD][PATCH] predefined segment symbol _begin
- Reply-to: vkutuzov at accesssoftek dot com
Hello everyone,
Please find attached patch, which adds an additional predefined segment
symbol _begin.
This is used, for example, in the glibc build.
-Viktor.
* gold/defstd.cc: added a new predefined symbol _begin to the
Define_symbol_in_segment array.
Index: defstd.cc
===================================================================
RCS file: /cvs/src/src/gold/defstd.cc,v
retrieving revision 1.8
diff -u -p -r1.8 defstd.cc
--- defstd.cc 7 Nov 2009 02:02:29 -0000 1.8
+++ defstd.cc 10 Feb 2010 18:48:57 -0000
@@ -189,6 +189,20 @@ const Define_symbol_in_segment in_segmen
true // only_if_ref
},
{
+ "_begin", // name
+ elfcpp::PT_LOAD, // segment_type
+ elfcpp::PF(0), // segment_flags_set
+ elfcpp::PF(0), // segment_flags_clear
+ 0, // value
+ 0, // size
+ elfcpp::STT_NOTYPE, // type
+ elfcpp::STB_GLOBAL, // binding
+ elfcpp::STV_DEFAULT, // visibility
+ 0, // nonvis
+ Symbol::SEGMENT_START, // offset_from_base
+ true // only_if_ref
+ },
+ {
"etext", // name
elfcpp::PT_LOAD, // segment_type
elfcpp::PF_X, // segment_flags_set