This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld -plugin option
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Yuanfang Chen <cyfmxc at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Wed, 5 Feb 2014 16:17:38 -0800
- Subject: Re: ld -plugin option
- Authentication-results: sourceware.org; auth=none
- References: <CAJh9x3qqfsGi1M0qxiTWWFFLd4ZCpCc6bBgGMoyxT-3=Qvm2+w at mail dot gmail dot com>
On Wed, Feb 5, 2014 at 4:07 PM, Yuanfang Chen <cyfmxc@gmail.com> wrote:
> Hello,
>
> Maybe this is a silly question, however, it annoys me today for too
> long. I'm using ld 2.24, which shows that it supports '-plugin'
> option by 'ld --help |grep plugin', however 'ld -plugin' returns
> "unrecognized option '-plugin'". I really don't know where the
> problem is. Another question is that is the plugin interface
> supported by ld and ld.gold the same?
Yes the interfaces is the same. The issue you are having is -plugin
takes an argument and you are not supplying an option to the -plugin
option.
Thanks,
Andrew Pinski
>
> thank you so much,
> cyf
>
> [arch@t431s-arch gcc-4.6.4]$ gcc4.6 -###
> Using built-in specs.
> COLLECT_GCC=gcc4.6
> COLLECT_LTO_WRAPPER=/home/arch/Install/gcc-4.6.4/libexec/gcc/x86_64-unknown-linux-gnu/4.6.4/lto-wrapper
> Target: x86_64-unknown-linux-gnu
> Configured with: ../gcc-4.6.4/configure
> --enable-languages=c,c++,fortran --enable-multiarch --enable-shared
> --enable-threads=posix --program-suffix=4.6 --with-gmp=/usr/local/lib
> --with-mpc=/usr/lib --with-mpfr=/usr/lib --without-included-gettext
> --with-system-zlib --with-tune=generic
> --prefix=/home/arch/Install/gcc-4.6.4 --disable-multilib --enable-lto
> --enable-gold --enable-ld=default --enable-plugin
> --with-plugin-ld=ld.gold
> Thread model: posix
> gcc version 4.6.4 (GCC)
>
> [arch@t431s-arch gcc-4.6.4]$ ld -v
> GNU ld (GNU Binutils) 2.24
>
> [arch@t431s-arch gcc-4.6.4]$ ld -plugin
> ld: unrecognized option '-plugin'
> ld: use the --help option for usage information