aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSriraman Tallam <tmsriram@google.com>2013-01-16 22:47:14 +0000
committerSriraman Tallam <tmsriram@google.com>2013-01-16 22:47:14 +0000
commit7c381248b302a5290a3f7a240a2cfe14181d7e24 (patch)
treee55f6bc22d214f59b4a6b19ce27364d4dbb485d4 /gold/testsuite
parentUpdate x86 size relocation check (diff)
downloadbinutils-gdb-7c381248b302a5290a3f7a240a2cfe14181d7e24.tar.gz
binutils-gdb-7c381248b302a5290a3f7a240a2cfe14181d7e24.tar.bz2
binutils-gdb-7c381248b302a5290a3f7a240a2cfe14181d7e24.zip
2013-01-16 Sriraman Tallam <tmsriram@google.com>
* layout.cc (Layout::layout): Do not do default sorting for text sections when section ordering is specified. (make_output_section): Ditto. * testsuite/plugin_final_layout.cc: Name the function sections to catch reordering issues.
Diffstat (limited to 'gold/testsuite')
-rw-r--r--gold/testsuite/plugin_final_layout.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gold/testsuite/plugin_final_layout.cc b/gold/testsuite/plugin_final_layout.cc
index 3e264f623af..88dea30d4b7 100644
--- a/gold/testsuite/plugin_final_layout.cc
+++ b/gold/testsuite/plugin_final_layout.cc
@@ -21,16 +21,22 @@
// MA 02110-1301, USA.
// The goal of this program is to verify if section ordering
-// via plugins happens correctly.
+// via plugins happens correctly. Also, test is plugin based ordering
+// overrides default text section ordering where ".text.hot" sections
+// are grouped. The plugin does not want foo and baz next to each other.
+// Plugin section order is foo() followed by bar() and then baz().
+__attribute__ ((section(".text._Z3barv")))
void bar ()
{
}
+__attribute__ ((section(".text.hot._Z3bazv")))
void baz ()
{
}
+__attribute__ ((section(".text.hot._Z3foov")))
void foo ()
{
}