gold/arm.cc: Output mapping symbol for PLT code
authorWill Newton <will.newton@linaro.org>
Mon, 9 Feb 2015 09:11:54 +0000 (17:11 +0800)
committerWill Newton <will.newton@linaro.org>
Wed, 11 Feb 2015 07:18:59 +0000 (15:18 +0800)
Output an ARM state mapping symbol at the start of the PLT. With the
current code objdump will fail to disassemble the PLT that gold
creates.

gold/ChangeLog:

2015-02-11  Will Newton  <will.newton@linaro.org>

PR gold/13321
* arm.cc (Target_arm::make_plt_section): Create an ARM
state mapping symbol at the start of the PLT.

gold/ChangeLog
gold/arm.cc

index 87900ad6ea7318f323fee64916ca301be3b01595..17b7f44fb07dca03c5234c37007ceca026237ccb 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-11  Will Newton  <will.newton@linaro.org>
+
+       PR gold/13321
+       * arm.cc (Target_arm::make_plt_section): Create an ARM
+       state mapping symbol at the start of the PLT.
+
 2015-02-09  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/Makefile.am (two_file_shared_2_pic_1_test_DEPENDENCIES):
index be2294c3e1baedbb00ecb4269e55e30c0263a771..f1d4fe930bb70a8356a6b12293048d69073e165c 100644 (file)
@@ -7938,6 +7938,13 @@ Target_arm<big_endian>::make_plt_section(
                                      (elfcpp::SHF_ALLOC
                                       | elfcpp::SHF_EXECINSTR),
                                      this->plt_, ORDER_PLT, false);
+      symtab->define_in_output_data("$a", NULL,
+                                   Symbol_table::PREDEFINED,
+                                   this->plt_,
+                                   0, 0, elfcpp::STT_NOTYPE,
+                                   elfcpp::STB_LOCAL,
+                                   elfcpp::STV_DEFAULT, 0,
+                                   false, false);
     }
 }