This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
- From: Sriraman Tallam <tmsriram at google dot com>
- To: binutils <binutils at sourceware dot org>, Ian Lance Taylor <iant at google dot com>, Cary Coutant <ccoutant at google dot com>
- Date: Tue, 13 Sep 2011 14:58:33 -0700
- Subject: Map ".text.hot" and ".text.unlikely" input section prefixes to separate output sections.
Hi,
Sections prefixed with ".text.hot", ".text.unlikely" and
".text.startup" should map to separate output sections so that they
can be grouped together. The following simple patch does this. Alright
to submit?
Thanks,
-Sri.
* layout.cc (Layout::section_name_mapping): Map ".text.hot" and
".text.unlikely", and ".text.startup" input section prefixes to
separate output sections.
Index: layout.cc
===================================================================
RCS file: /cvs/src/src/gold/layout.cc,v
retrieving revision 1.219
diff -u -r1.219 layout.cc
--- layout.cc 27 Aug 2011 01:28:17 -0000 1.219
+++ layout.cc 13 Sep 2011 21:55:36 -0000
@@ -4437,6 +4437,9 @@
#define MAPPING_INIT(f, t) { f, sizeof(f) - 1, t, sizeof(t) - 1 }
const Layout::Section_name_mapping Layout::section_name_mapping[] =
{
+ MAPPING_INIT(".text.hot.", ".text.hot"),
+ MAPPING_INIT(".text.unlikely.", ".text.unlikely"),
+ MAPPING_INIT(".text.startup.", ".text.startup"),
MAPPING_INIT(".text.", ".text"),
MAPPING_INIT(".rodata.", ".rodata"),
MAPPING_INIT(".data.rel.ro.local", ".data.rel.ro.local"),