[PATCH][GOLD] Fix GOT output section order.
Doug Kwan (關振德)
dougkwan@google.com
Sat Oct 16 18:20:00 GMT 2010
Hi
This fixes a bug that two output section data of the output GOT
section have different R/W flags. It also fixes the output order.
-Doug
2010-10-16 Doug Kwan <dougkwan@google.com>
* gold/arm.cc (Target_arm::got_section): Use correct order and set
GOT output section to be writable.
-------------- next part --------------
Index: gold/arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.123
diff -u -u -p -r1.123 arm.cc
--- gold/arm.cc 12 Oct 2010 19:00:30 -0000 1.123
+++ gold/arm.cc 16 Oct 2010 18:03:56 -0000
@@ -4183,9 +4183,8 @@ Target_arm<big_endian>::got_section(Symb
this->got_ = new Arm_output_data_got<big_endian>(symtab, layout);
layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
- this->got_, ORDER_RELRO, true);
+ (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE),
+ this->got_, ORDER_DATA, false);
// The old GNU linker creates a .got.plt section. We just
// create another set of data in the .got section. Note that we
@@ -4193,8 +4192,7 @@ Target_arm<big_endian>::got_section(Symb
// might be empty.
this->got_plt_ = new Output_data_space(4, "** GOT PLT");
layout->add_output_section_data(".got", elfcpp::SHT_PROGBITS,
- (elfcpp::SHF_ALLOC
- | elfcpp::SHF_WRITE),
+ (elfcpp::SHF_ALLOC | elfcpp::SHF_WRITE),
this->got_plt_, ORDER_DATA, false);
// The first three entries are reserved.
More information about the Binutils
mailing list