ld.gold error unsupported -mbss-plt code

Alan Modra amodra@gmail.com
Wed Jul 24 02:00:17 GMT 2024


On Wed, Jul 24, 2024 at 10:32:52AM +1200, Chris Packham wrote:
> error: liblxcfs.so.p/src_bindings.c.o: unsupported -mbss-plt code
> ...
> 
> I don't really understand what ld.gold is complaining about.

Around 2007, the powerpc ABI (and gcc and binutils) gained what I
called secure-plt.  Prior to that, the powerpc plt section was a bss
section that was written with code generated by ld.so.  This required
a section that was both writable and executable, and therefore
somewhat of a target for malicious code.  The new secure-plt ABI
doesn't use an executable plt, but the code generated to make a call
via the plt is a little slower than bss-plt in moderately sized
executables and libraries.  Your gcc might be configured to generate
bss-plt code by default, so to use ld.gold when linking shared
libraries or PIEs you'd need to pass -msecure-plt to gcc when
compiling.  If your project has assembly that makes bss-plt style
calls then more work will be needed.

-- 
Alan Modra


More information about the Binutils mailing list