diff options
author | Sriraman Tallam <tmsriram@google.com> | 2011-09-29 23:45:57 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2011-09-29 23:45:57 +0000 |
commit | f0558624db8e79622bb71ea5279ec6b5f8c9bc79 (patch) | |
tree | d197f7cab34bbcca71419dd08cdc05e47d661d0d /gold/testsuite/plugin_final_layout.cc | |
parent | a7dac15368485853f4bd463352afb9b49517b624 (diff) | |
download | ppe42-binutils-f0558624db8e79622bb71ea5279ec6b5f8c9bc79.tar.gz ppe42-binutils-f0558624db8e79622bb71ea5279ec6b5f8c9bc79.zip |
2011-09-29 Sriraman Tallam <tmsriram@google.com>
* layout.h (section_order_map_): New member.
(get_section_order_map): New member function.
* output.cc (Output_section::add_input_section): Check for patterns
only when --section-ordering-file is specified.
* gold.cc (queue_middle_tasks): Delay updating order of sections till
output_sections have been formed.
* layout.cc (Layout_Layout): Initialize section_order_map_.
* plugin.cc (update_section_order): Store order in order_map. Do not
update the order.
* testsuite/Makefile.am: Add test case for plugin_final_layout.
* testsuite/Makefile.in: Regenerate.
* testsuite/plugin_section_order.c: New file.
* testsuite/plugin_final_layout.cc: New file.
* testsuite/plugin_final_layout.sh: New file.
Diffstat (limited to 'gold/testsuite/plugin_final_layout.cc')
-rw-r--r-- | gold/testsuite/plugin_final_layout.cc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gold/testsuite/plugin_final_layout.cc b/gold/testsuite/plugin_final_layout.cc new file mode 100644 index 0000000000..3e264f623a --- /dev/null +++ b/gold/testsuite/plugin_final_layout.cc @@ -0,0 +1,41 @@ +// plugin_final_layout.cc -- a test case for gold + +// Copyright 2011 Free Software Foundation, Inc. +// Written by Sriraman Tallam <tmsriram@google.com>. + +// This file is part of gold. + +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, +// MA 02110-1301, USA. + +// The goal of this program is to verify if section ordering +// via plugins happens correctly. + +void bar () +{ +} + +void baz () +{ +} + +void foo () +{ +} + +int main () +{ + return 0; +} |