* ld -plugin option
@ 2014-02-06 0:07 Yuanfang Chen
2014-02-06 0:17 ` Andrew Pinski
0 siblings, 1 reply; 5+ messages in thread
From: Yuanfang Chen @ 2014-02-06 0:07 UTC (permalink / raw)
To: binutils
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?
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ld -plugin option
2014-02-06 0:07 ld -plugin option Yuanfang Chen
@ 2014-02-06 0:17 ` Andrew Pinski
2014-02-06 0:33 ` Yuanfang Chen
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Pinski @ 2014-02-06 0:17 UTC (permalink / raw)
To: Yuanfang Chen; +Cc: binutils
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ld -plugin option
2014-02-06 0:17 ` Andrew Pinski
@ 2014-02-06 0:33 ` Yuanfang Chen
2014-02-06 0:47 ` H.J. Lu
0 siblings, 1 reply; 5+ messages in thread
From: Yuanfang Chen @ 2014-02-06 0:33 UTC (permalink / raw)
To: Andrew Pinski; +Cc: binutils
On Wed, Feb 5, 2014 at 7:17 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> 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
Well, that's really confusing, I was expecting something like 'missing
arguments' like the ld.gold does. :-)
I'am asking this because when I'm doing this: (all are non binary object)
ld.gold -plugin=/path/to/plugin a.o b.o c.o
everything goes fine.
but
ld -plugin=/path/to/plugin a.o b.o c.o
complains b.o: file not recognized: File format not recognized
If the plugin interface is the same, there should not be any problem, right?
btw, I'm using the LLVM gold plugin, which implements the gold interface.
Thank you,
cyf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ld -plugin option
2014-02-06 0:33 ` Yuanfang Chen
@ 2014-02-06 0:47 ` H.J. Lu
[not found] ` <CAJh9x3pox1d4SL-OGi3NZjbW+1_4VYoSX7LE5g9fVgoUpMo5fw@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: H.J. Lu @ 2014-02-06 0:47 UTC (permalink / raw)
To: Yuanfang Chen; +Cc: Andrew Pinski, binutils
On Wed, Feb 5, 2014 at 4:33 PM, Yuanfang Chen <cyfmxc@gmail.com> wrote:
> On Wed, Feb 5, 2014 at 7:17 PM, Andrew Pinski <pinskia@gmail.com> wrote:
>> 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
>
> Well, that's really confusing, I was expecting something like 'missing
> arguments' like the ld.gold does. :-)
>
> I'am asking this because when I'm doing this: (all are non binary object)
> ld.gold -plugin=/path/to/plugin a.o b.o c.o
> everything goes fine.
>
> but
> ld -plugin=/path/to/plugin a.o b.o c.o
> complains b.o: file not recognized: File format not recognized
>
How did you configure binutils? Did you use --enable-plugins?
--
H.J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ld -plugin option
[not found] ` <CAJh9x3pox1d4SL-OGi3NZjbW+1_4VYoSX7LE5g9fVgoUpMo5fw@mail.gmail.com>
@ 2014-02-06 2:28 ` Yuanfang Chen
0 siblings, 0 replies; 5+ messages in thread
From: Yuanfang Chen @ 2014-02-06 2:28 UTC (permalink / raw)
Cc: Andrew Pinski, binutils
---------- Forwarded message ----------
From: Yuanfang Chen <cyfmxc@gmail.com>
Date: Wed, Feb 5, 2014 at 9:26 PM
Subject: Re: ld -plugin option
To: "H.J. Lu" <hjl.tools@gmail.com>
>
> How did you configure binutils? Did you use --enable-plugins?
>
> --
> H.J.
I believe so.
[fedora18@t1600-f18 ~]$ ld -v
GNU ld version 2.23.51.0.1-10.fc18 20120806
http://kojipkgs.fedoraproject.org//packages/binutils/2.23.51.0.1/10.fc18/data/logs/x86_64/build.log
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-06 2:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06 0:07 ld -plugin option Yuanfang Chen
2014-02-06 0:17 ` Andrew Pinski
2014-02-06 0:33 ` Yuanfang Chen
2014-02-06 0:47 ` H.J. Lu
[not found] ` <CAJh9x3pox1d4SL-OGi3NZjbW+1_4VYoSX7LE5g9fVgoUpMo5fw@mail.gmail.com>
2014-02-06 2:28 ` Yuanfang Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).