This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add plugin interface to LD [6/4] Add archive support to plugin interface.


On 06/10/2010 23:57, Richard Henderson wrote:
> On 09/26/2010 05:43 PM, Dave Korn wrote:
>>   I didn't want to change the interface
>> of add_archive_element, since it's one of the few actual public interfaces of
>> libbfd, and we don't have any versioning.
> 
> Nothing in libbfd pretends to have a stable ABI, so I don't think you
> need to worry about that.

> I think I'd prefer a fourth argument for add_archive_element which, if 
> non-null, receives the replacement.  Thus for a.out we can simply not
> change anything except add the NULL 4th argument.  (Recall that a.out
> cannot represent LTO data at all, and so needn't worry about this whole
> plugin business.)
> 
> Honestly, I think it would clean up some of your arelt_substitute_bfd
> checks as well.

  OK, I was erring on the side of caution, but on most platforms, it won't
even hurt if there's a fourth argument provided by the caller that the callee
doesn't know about; will change it as you suggest.

>> +#ifdef ENABLE_PLUGINS
>> +  lang_input_statement_type orig_input;
>> +  int fildes;
>> +#endif /* ENABLE_PLUGINS */
> 
> See previous comments re keeping decls near code.
> 
>> +    info_msg ("%I\n",
>> +#ifdef ENABLE_PLUGINS
>> +	&orig_input
>> +#else
>> +	input
>> +#endif /* ENABLE_PLUGINS */
> 
> In this case I don't think you need to conditionalize orig_input.
> Just do it all the time and be done with it.

  Right you are.  Thanks for the comments.

    cheers,
      DaveK



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]