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]

[GOLD] Set sh_info of .rela.plt for powerpc


readelf has warned about missing .rela.plt sh_info field since
2016-08-19.  In an executable or shared library, sh_info on a
SHT_REL/SHT_RELA is really just decoration (reloc r_offset is not
section relative), but comply just to silence the warning.

Committed master and 2.28 branch.

	* powerpc.cc (Target_powerpc::make_plt_section): Point sh_info of
	".rela.plt" at ".plt".

diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 4b5026f..6d6d0dd 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -3421,6 +3421,9 @@ Target_powerpc<size, big_endian>::make_plt_section(Symbol_table* symtab,
 				       ? ORDER_SMALL_DATA
 				       : ORDER_SMALL_BSS),
 				      false);
+
+      Output_section* rela_plt_os = plt_rel->output_section();
+      rela_plt_os->set_info_section(this->plt_->output_section());
     }
 }
 

-- 
Alan Modra
Australia Development Lab, IBM


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