This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[GOLD] Set sh_info of .rela.plt for powerpc
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Mon, 9 Jan 2017 13:29:18 +1030
- Subject: [GOLD] Set sh_info of .rela.plt for powerpc
- Authentication-results: sourceware.org; auth=none
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