https://sourceware.org/bugzilla/show_bug.cgi?id=22694

Alexander Monakov <amonakov at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |amonakov at gmail dot com

--- Comment #6 from Alexander Monakov <amonakov at gmail dot com> ---
Please reconsider. collect2 has always passed through -fuse-ld=<gold|bfd> to
the linker, and gold has accepted (and ignored) it until the recent commit
7ef67ba5339 that was supposed to fix PR 22042.

Now gold simply segfaults when given the option without an argument, while
before it was ignored (as intended). And the functionality that was supposed to
ignore the option does not work anymore for some reason.

$ gdb --args /mnt/build/binutils/gold/ld.gold -fuse-ld
[...]
(gdb) r
Starting program: /mnt/build/binutils/gold/ld.gold -fuse-ld
bt
Program received signal SIGSEGV, Segmentation fault.
gold::options::parse_string (option_name=0x7fffffffe18e "-fuse-ld", arg=0x0,
retval=retval@entry=0x7fffffff7200) at
/mnt/checkout/binutils-gdb/gold/options.cc:253
253       if (*arg == '\0')
(gdb) bt
#0  gold::options::parse_string (option_name=0x7fffffffe18e "-fuse-ld",
arg=0x0, retval=retval@entry=0x7fffffff7200) at
/mnt/checkout/binutils-gdb/gold/options.cc:253
#1  0x0000000000429f03 in gold::General_options::Struct_fuse_ld::parse_to_value
(this=0x7fffffff7198, option_name=<optimized out>, arg=<optimized out>) at
/mnt/checkout/binutils-gdb/gold/options.h:895
#2  0x000000000065a047 in gold::Command_line::process_one_option
(this=this@entry=0x7fffffff4b30, argc=argc@entry=1,
argv=argv@entry=0x7fffffffde30, i=i@entry=0,
no_more_options=no_more_options@entry=0x7fffffff3fdf)
    at /mnt/checkout/binutils-gdb/gold/options.cc:1523
#3  0x000000000065b985 in gold::Command_line::process
(this=this@entry=0x7fffffff4b30, argc=1, argv=0x7fffffffde30) at
/mnt/checkout/binutils-gdb/gold/options.cc:1565
#4  0x0000000000407c3a in main (argc=<optimized out>, argv=<optimized out>) at
/mnt/checkout/binutils-gdb/gold/main.cc:165

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to