[PATCH] dependency list for static libraries

Howard Chu hyc@symas.com
Thu Sep 24 09:30:36 GMT 2020


Howard Chu wrote:
>> * Some archives are incorrectly omitted: the executable uses A, but A's
>>   dependency B is not on the command line.  Now I hope Howard can clarify on this
>>   topic:) What do you want to achieve with the dependency recorded in the archive?
>>   I assume that you want the linker to smartly link B.
> Yes.
> 
>>   This is indeed the #pragma
>>   comment(lib, ...) and .deplibs feature clang/LLD support.
> Perhaps, but I remain skeptical.
> 
In particular, the feature you're proposing only works with ELF object files,
not with a.out files or any of the myriad non-ELF object file formats. It is
attacking the problem at the wrong level.

-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/


More information about the Binutils mailing list