This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] gold/arm.cc: Output mapping symbol for PLT code


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-09  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/arm.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gold/arm.cc b/gold/arm.cc
index be2294c..f1d4fe9 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -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);
     }
 }
 
-- 
2.1.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]