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] Update ppc do_make_elf_object for -R with ET_EXEC


This updates do_make_elf_object to handle ET_EXEC with -R.

Andreas.

	* powerpc.cc (do_make_elf_object): Allow ET_EXEC files with
	--just-symbols.

---
 gold/powerpc.cc | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index 147d660..f4a9385 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -1149,7 +1149,10 @@ Target_powerpc<size, big_endian>::do_make_elf_object(
     off_t offset, const elfcpp::Ehdr<size, big_endian>& ehdr)
 {
   int et = ehdr.get_e_type();
-  if (et == elfcpp::ET_REL)
+  // ET_EXEC files are valid input for --just-symbols/-R,
+  // and we treat them as relocatable objects.
+  if (et == elfcpp::ET_REL
+      || (et == elfcpp::ET_EXEC && input_file->just_symbols()))
     {
       Powerpc_relobj<size, big_endian>* obj =
 	new Powerpc_relobj<size, big_endian>(name, input_file, offset, ehdr);
-- 
1.7.12

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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