[GOLD] powerpc assertion failure

Alan Modra amodra@gmail.com
Tue Jan 19 02:58:54 GMT 2021


A testcase with only ifuncs can result in no plt section (ifunc plt
entries might instead be in iplt), which means we can get to this code
without a static link.

I'm applying this patch to mainline and the 2.36 branch.

	PR 27203
	* powerpc.cc (do_plt_fde_location): Remove doing_static_link
	assertion.

diff --git a/gold/powerpc.cc b/gold/powerpc.cc
index e2966ef096b..ec6f950eb21 100644
--- a/gold/powerpc.cc
+++ b/gold/powerpc.cc
@@ -3946,7 +3946,6 @@ Target_powerpc<size, big_endian>::do_plt_fde_location(const Output_data* plt,
       // See Output_data_glink::do_write() for glink contents.
       if (len == 0)
 	{
-	  gold_assert(parameters->doing_static_link());
 	  // Static linking may need stubs, to support ifunc and long
 	  // branches.  We need to create an output section for
 	  // .eh_frame early in the link process, to have a place to

-- 
Alan Modra
Australia Development Lab, IBM


More information about the Binutils mailing list