From 9e9143bc874ab4742433b7498413313fb1723e8b Mon Sep 17 00:00:00 2001 From: Sriraman Tallam Date: Thu, 10 Jan 2013 00:18:15 +0000 Subject: 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 * 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. --- gold/output.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'gold/output.h') diff --git a/gold/output.h b/gold/output.h index a8fe594..8f3943b 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* -- cgit v1.1