https://sourceware.org/bugzilla/show_bug.cgi?id=23971
Bug ID: 23971
Summary: gold: Seg-fault when running a plugin with no inputs
Product: binutils
Version: 2.32 (HEAD)
Status: NEW
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: nickc at redhat dot com
CC: ian at airs dot com
Target Milestone: ---
Created attachment 11447
--> https://sourceware.org/bugzilla/attachment.cgi?id=11447&action=edit
Proposed patch
Running gold with a plugin but no input files results in a segmentation fault:
% ld.gold -plugin /usr/lib64/LLVMgold.so does-not-exist.o
ld.gold: error: cannot open does-not-exist.o: No such file or directory
Segmentation fault (core dumped)
% ld.gold -plugin
/usr/libexec/gcc/x86_64-redhat-linux/8/liblto_plugin.so.0.0.0 does-not-exist.o
ld.gold: error: cannot open does-not-exist.o: No such file or directory
Segmentation fault (core dumped)
It appears that plugin.cc:Plugin_hook assumes that the entry parameter will
always be set. The uploaded patch is a suggestion for how this might be fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils