[PATCH] D77779: [ELF] Find files relative to the current linker script for INPUT() and GROUP()

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 01:34:00 PDT 2020


psmith added a comment.

The feature seems reasonable to me. It is a potentially breaking change for someone that had two libraries called libfoo.a.1 one in CWD and one adjacent to libfoo.a (where libfoo.a is a linker script with INPUT(libfooa.a.1)). As I understand it we'd prefer the libfoo.a.1 from the same directory as libfoo over the version in CWD. I think that in this case it is very unlikely so a release note entry and documentation (LinkerScript.rst?) would be sufficient.

Will be worth making sure that if BFD follow a slightly different route then we synchronize with them rather than gold as I think BFD is more widely used in practice.

Given it is Easter this week and people may be on holiday, will be worth waiting a bit for further comments, if we don't get any more I'll be happy to approve next week.



================
Comment at: lld/ELF/ScriptParser.cpp:291
   }
 
   if (s.startswith("/")) {
----------------
Now that the rules are getting a bit more complicated. It would be good to have a comment like Gold that explains them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77779/new/

https://reviews.llvm.org/D77779





More information about the llvm-commits mailing list