This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Lookup INPUT argument in the current directory
ClosedPublic

Authored by atanasyan on Nov 26 2015, 8:12 AM.

Details

Summary

If an argument of the INPUT directive is a regular path, linker should lookup it in the current folder first.

The fix does not contain any test cases because I think it is not a good idea to pollute a current folder (which in general might be arbitrary) by test files.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan updated this revision to Diff 41260.Nov 26 2015, 8:12 AM
atanasyan retitled this revision from to [ELF] Lookup INPUT argument in the current directory.
atanasyan updated this object.
atanasyan added a reviewer: ruiu.
atanasyan set the repository for this revision to rL LLVM.
atanasyan added a project: lld.
atanasyan added a subscriber: llvm-commits.
ruiu accepted this revision.Nov 26 2015, 9:32 AM
ruiu edited edge metadata.

LGTM with a nit.

ELF/LinkerScript.cpp
182–185 ↗(On Diff #41260)
} else if (sys::fs::exists(S)) {
This revision is now accepted and ready to land.Nov 26 2015, 9:32 AM
emaste added a subscriber: emaste.Nov 26 2015, 11:06 AM
This revision was automatically updated to reflect the committed changes.