diff options
| author | Simon Atanasyan <simon@atanasyan.com> | 2015-11-26 05:53:00 +0000 |
|---|---|---|
| committer | Simon Atanasyan <simon@atanasyan.com> | 2015-11-26 05:53:00 +0000 |
| commit | 16b0cc9ee687d03d554dd54a17907ee7d00397c8 (patch) | |
| tree | 86075944a63fe5fc3a5678e7aa878f9c8d4e0d1a /lld/test | |
| parent | 5e35e669a58fad4f39ecea7289f5271fe89dafb9 (diff) | |
| download | bcm5719-llvm-16b0cc9ee687d03d554dd54a17907ee7d00397c8.tar.gz bcm5719-llvm-16b0cc9ee687d03d554dd54a17907ee7d00397c8.zip | |
[ELF] Reapply r254031 - LinkerScript: lookup absolute paths under sysroot
In case a sysroot prefix is configured, and the filename starts with
the '/' character, and the script being processed was located inside
the sysroot prefix, the file's name will be looked for in the sysroot
prefix. Otherwise, the linker falls to the common lookup scheme.
It is slightly modified version of the commit r254031. The problem of
the initial commit was in the `is_absolute` call. On Windows 'C:\' is
absolute path but we do not need to find it under sysroot. In this patch
linker looks up a path under sysroot only if the paths starts with '/'
character.
llvm-svn: 254135
Diffstat (limited to 'lld/test')
| -rw-r--r-- | lld/test/ELF/linkerscript.s | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/test/ELF/linkerscript.s b/lld/test/ELF/linkerscript.s index 0e845b2bd79..bff285b9761 100644 --- a/lld/test/ELF/linkerscript.s +++ b/lld/test/ELF/linkerscript.s @@ -38,6 +38,13 @@ # RUN: ld.lld -o %t2 %t.script -L%t.dir # RUN: llvm-readobj %t2 > /dev/null +# RUN: echo "GROUP(" %t /libxyz.a ")" > %t.script +# RUN: echo "GROUP(" %t /libxyz.a ")" > %t.dir/xyz.script +# RUN: not ld.lld -o %t2 %t.script +# RUN: not ld.lld -o %t2 %t.script --sysroot=%t.dir +# RUN: ld.lld -o %t2 %t.dir/xyz.script --sysroot=%t.dir +# RUN: llvm-readobj %t2 > /dev/null + # RUN: echo "GROUP(" %t.script2 ")" > %t.script1 # RUN: echo "GROUP(" %t ")" > %t.script2 # RUN: ld.lld -o %t2 %t.script1 |

