[lld] [lld][ELF] Enable link script to support absolute path matching (PR #156353)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 02:07:06 PDT 2025


================
@@ -411,18 +411,35 @@ void LinkerScript::assignSymbol(SymbolAssignment *cmd, bool inSec) {
   cmd->sym->type = v.type;
 }
 
-bool InputSectionDescription::matchesFile(const InputFile &file) const {
+// Convert an absolute address to a filename
----------------
smithp35 wrote:

What do you mean by "address" here? I think this attempting to extract the filename from an absolute path.

Assuming this is the right thing to do, then there are probably utility functions that exist already. Can you see if there is anything in `llvm::sys::path` .

https://github.com/llvm/llvm-project/pull/156353


More information about the llvm-commits mailing list