aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2009-02-25 19:05:21 +0000
committerCary Coutant <ccoutant@google.com>2009-02-25 19:05:21 +0000
commit401a9a73922f3b3ad7099859b7d3bc3c80397f3a (patch)
tree6a74503c6b496930ef074603db18cb9c9b5dbbd2 /gold/layout.cc
parent784788d2f758e76488ce5c12242fb97907d27b53 (diff)
downloadgdb-401a9a73922f3b3ad7099859b7d3bc3c80397f3a.zip
gdb-401a9a73922f3b3ad7099859b7d3bc3c80397f3a.tar.gz
gdb-401a9a73922f3b3ad7099859b7d3bc3c80397f3a.tar.bz2
* layout.cc (Layout::choose_output_section): Don't rename sections
when using a linker script that has a SECTIONS clause. * Makefile.in: Regenerate. * testsuite/Makefile.am (script_test_5.sh): New test case. * testsuite/Makefile.in: Regenerate. * testsuite/script_test_5.cc: New file. * testsuite/script_test_5.sh: New file. * testsuite/script_test_5.t: New file.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 0977557..2bc1483 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -426,7 +426,9 @@ Layout::choose_output_section(const Relobj* relobj, const char* name,
// output section.
size_t len = strlen(name);
- if (is_input_section && !parameters->options().relocatable())
+ if (is_input_section
+ && !this->script_options_->saw_sections_clause()
+ && !parameters->options().relocatable())
name = Layout::output_section_name(name, &len);
Stringpool::Key name_key;