This is the mail archive of the
mailing list for the binutils project.
Re: ld -plugin option
- From: Yuanfang Chen <cyfmxc at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: binutils <binutils at sourceware dot org>
- Date: Wed, 5 Feb 2014 19:33:01 -0500
- Subject: Re: ld -plugin option
- Authentication-results: sourceware.org; auth=none
- References: <CAJh9x3qqfsGi1M0qxiTWWFFLd4ZCpCc6bBgGMoyxT-3=Qvm2+w at mail dot gmail dot com> <CA+=Sn1=dO3wMyqOA6OLr7F-AxsYwUVB2PzO-dKGzv1_wep8b6A at mail dot gmail dot com>
On Wed, Feb 5, 2014 at 7:17 PM, Andrew Pinski <email@example.com> wrote:
> On Wed, Feb 5, 2014 at 4:07 PM, Yuanfang Chen <firstname.lastname@example.org> wrote:
>> 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
> 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.
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.