ld.gold error unsupported -mbss-plt code

Chris Packham judge.packham@gmail.com
Tue Jul 23 22:32:52 GMT 2024


Hi,

I'm experimenting with adding ld.gold as an option to our toolchains
but I'm hitting an error. This happens to be from the lxcfs package
which tries to use ld.gold if it's available. This only seems to
affect our powerpc 32 builds. Other architectures seem fine.

I've tried with and without -mbss-plt in $CFLAGS. I'm not sure if this
is a compiler issue, linker issue or just a problem with the flags we
are passing

The error is

$ powerpc-e500mc-linux-gnu-gcc  -o liblxcfs.so
liblxcfs.so.p/src_bindings.c.o liblxcfs.so.p/src_cgroups_cgfsng.c.o
liblxcfs.so.p/src_cgroups_cgroup.c.o
liblxcfs.so.p/src_cgroups_cgroup2_devices.c.o
liblxcfs.so.p/src_cgroups_cgroup_utils.c.o
liblxcfs.so.p/src_cgroup_fuse.c.o liblxcfs.so.p/src_cpuset_parse.c.o
liblxcfs.so.p/src_lxcfs.c.o liblxcfs.so.p/src_proc_cpuview.c.o
liblxcfs.so.p/src_proc_fuse.c.o liblxcfs.so.p/src_proc_loadavg.c.o
liblxcfs.so.p/src_sysfs_fuse.c.o liblxcfs.so.p/src_utils.c.o
-Wl,--as-needed -Wl,--allow-shlib-undefined -shared -fPIC
-Wl,--gc-sections -Wl,-z,relro -Wl,-z,now -Wl,-fuse-ld=gold
--sysroot=/usr/src/output/ppc_e500mc/lxcfs/staging -pthread
-Wl,--start-group
/usr/src/output/ppc_e500mc/lxcfs/staging/usr/lib/libfuse3.so -lpthread
-Wl,--end-group
/usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/../../../../powerpc-e500mc-linux-gnu/bin/ld.gold:
error: /usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/crtbeginS.o:
unsupported -mbss-plt code
/usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/../../../../powerpc-e500mc-linux-gnu/bin/ld.gold:
error: /usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/crtbeginS.o:
unsupported -mbss-plt code
/usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/../../../../powerpc-e500mc-linux-gnu/bin/ld.gold:
error: /usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/crtbeginS.o:
unsupported -mbss-plt code
/usr/bin/../lib/gcc/powerpc-e500mc-linux-gnu/13.2.0/../../../../powerpc-e500mc-linux-gnu/bin/ld.gold:
error: liblxcfs.so.p/src_bindings.c.o: unsupported -mbss-plt code
...

I don't really understand what ld.gold is complaining about. My
options right now are to not build that package for powerpc 32 or to
not have ld.gold available for powerpc 32. Both of those options
aren't too terrible but if it were a case of simply passing the right
arguments then having ld.gold available would be nicer.

Thanks,
Chris


More information about the Binutils mailing list