https://sourceware.org/bugzilla/show_bug.cgi?id=25873
Bug ID: 25873
Summary: ar segfaults when liblto_plugin.so.0.0.0 is a symlink
in /usr/lib/bfd-plugins
Product: binutils
Version: 2.34
Status: NEW
Severity: normal
Priority: P2
Component: binutils
Assignee: unassigned at sourceware dot org
Reporter: tstellar at redhat dot com
Target Milestone: ---
ar segfaults when using a plugin from /usr/lib/bfd-plugins that is a symlink.
Here is how to reproduce:
echo "int foo(){}" | gcc -flto -O2 -c -x c -o foo.o -
echo "int bar(){}" | gcc -flto -O2 -c -x c -o bar.o -
ln -s /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so.0.0.0
/usr/lib/bfd-plugins/
ar crs foo.a foo.o bar.o
Segmentation fault (core dumped)
If the plugin is copied directly and not a symlink, then there is no segfault:
rm /usr/lib/bfd-plugins/liblto_plugin.so.0.0.0
cp /usr/libexec/gcc/x86_64-redhat-linux/10/liblto_plugin.so.0.0.0
/usr/lib/bfd-plugins/
ar crs foo.a foo.o bar.o
--
You are receiving this mail because:
You are on the CC list for the bug.