diff options
author | Sriraman Tallam <tmsriram@google.com> | 2013-01-10 00:18:14 +0000 |
---|---|---|
committer | Sriraman Tallam <tmsriram@google.com> | 2013-01-10 00:18:14 +0000 |
commit | 3c5b802e093784fe99d512a05471473b05368acb (patch) | |
tree | 9bb40b1d71c5e63c7037016bc4957a9df9238f69 /gold/output.h | |
parent | 0f2e664fc9948520f66613ec83c56816098f5b7c (diff) | |
download | binutils-redhat-3c5b802e093784fe99d512a05471473b05368acb.tar.gz |
Make linker scripts and section ordering via --section-ordering-file or
linker plugins work. This patch lets linker scripts take precedence.
2013-01-09 Sriraman Tallam <tmsriram@google.com>
* output.h (sort_attached_input_sections): Change to be public.
* script-sections.cc
(Output_section_definition::set_section_addresses): Sort
attached input sections according to section order before linker
script assigns section addresses.
(Orphan_output_section::set_section_addresses): Sort
attached input sections according to section order before linker
script assigns section addresses.
* Makefile.am (final_layout.sh): Use a simple linker script to
check if section ordering still works.
* Makefile.in: Regenerate.
Diffstat (limited to 'gold/output.h')
-rw-r--r-- | gold/output.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gold/output.h b/gold/output.h index a8fe59405b..8f3943b042 100644 --- a/gold/output.h +++ b/gold/output.h @@ -3300,6 +3300,10 @@ class Output_section : public Output_data this->dynsym_index_ = index; } + // Sort the attached input sections. + void + sort_attached_input_sections(); + // Return whether the input sections sections attachd to this output // section may require sorting. This is used to handle constructor // priorities compatibly with GNU ld. @@ -4253,10 +4257,6 @@ class Output_section : public Output_data add_output_merge_section(Output_section_data* posd, bool is_string, uint64_t entsize); - // Sort the attached input sections. - void - sort_attached_input_sections(); - // Find the merge section into which an input section with index SHNDX in // OBJECT has been added. Return NULL if none found. Output_section_data* |