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 [3/4] Get symbols and resolutions.


On 06/10/2010 23:28, Richard Henderson wrote:
> On 09/22/2010 10:31 PM, Dave Korn wrote:
>> +      if (blhe->type == bfd_link_hash_common)
>> +	{
>> +	  /* Is this right?  The COMMON section only exists in the
>> +	     output file, so it seems reasonable.  */
>> +	  syms[n].resolution = LDPR_RESOLVED_EXEC;
>> +	  continue;
> 
> Common symbols can be exported or not exported when generating a
> shared library.  Another check is needed here.  In fact, I don't
> see that you're doing any shared library preemption checking in
> this function.
> 
> ... that said, all that is elf-only; windows doesn't do library
> symbol preemption.

  Yep.  Or visibility for that matter.  And library symbols typically get
resolved in practice by linking an import stub into the executable.
> 
>> +  /* Suppresses "unused" warnings without relying on GCC attribute.  */
>> +  info = info;
>> +  value = value;
> 
> Er, I presume this is going away in a future patch?

  Well I had to do something to suppress the unused warnings, those parameters
are passed by the BFD callback interface whether I need to use them or not.
We've got ATTRIBUTE_UNUSED, I know, but I thought "Why not use something
completely generic".  I see you've asked for ATTRIBUTE_UNUSED in one of the
other posts, so I'll do that.

  Need to think more about the common symbols, but have to go AFK for a while
now.  Thanks for all the help, I'll get back on this later.

    cheers,
      DaveK


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