[PATCH] [ELF] Fix the file look up algorithm used in the linker script GROUP command.

Simon Atanasyan simon at atanasyan.com
Thu May 1 09:29:36 PDT 2014


Thanks for review.

Closed by commit rL207769 (authored by @atanasyan)

================
Comment at: include/lld/ReaderWriter/ELFLinkingContext.h:176-180
@@ -175,1 +175,7 @@
 
+  /// \brief Searches directories for a match on the input file.
+  /// If \p fileName is an absolute path and \p isSysRooted is true, check
+  /// the file under sysroot directory. If \p fileName is a relative path
+  /// and is not in the current directory, search the file through library
+  /// search directories.
+  ErrorOr<StringRef> searchFile(StringRef fileName, bool isSysRooted) const;
----------------
Simon Atanasyan wrote:
> Shankar Kalpathi Easwaran wrote:
> > There is also a third thing, to support namespaces. You could refer to -l:mylib.a, the linker would search by not adding a prefix 'lib'.
> I did not plan to support namespaces in this fix. But now I think it is a good idea to cover all cases by this patch. Will implement this soon.
Namespace support makes this patch too big. For example, now we cannot correctly parse namespace in a linker script at all. So I will implement this in a separate patch.

http://reviews.llvm.org/D3575






More information about the llvm-commits mailing list