[lld] r286378 - [ELF] - Add separate form for -R alias.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 9 08:38:15 PST 2016


Author: grimar
Date: Wed Nov  9 10:38:15 2016
New Revision: 286378

URL: http://llvm.org/viewvc/llvm-project?rev=286378&view=rev
Log:
[ELF] - Add separate form for -R alias.

During link of devel/chrpath (FreeBSD port), found next issue:
/usr/bin/ld: error: unclosed comment in a linker script
/usr/bin/ld: error: line 1: unknown directive: �
/usr/bin/ld: error: ��

Problem was not obvious and the reason was that we did not accept
the separate form of -R. While invocation line contained it:
cc -Wl,-R /usr/local/lib -o prog prog.c

CPIO file produced contained /usr/local/lib file. 
Which looks because of reasons above
contained inside the content of whole lib folder, 
and it then was passed as an input and
proccessed as linker script.

Modified:
    lld/trunk/ELF/Options.td

Modified: lld/trunk/ELF/Options.td
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=286378&r1=286377&r2=286378&view=diff
==============================================================================
--- lld/trunk/ELF/Options.td (original)
+++ lld/trunk/ELF/Options.td Wed Nov  9 10:38:15 2016
@@ -244,7 +244,7 @@ def alias_o_output: Joined<["--"], "outp
 def alias_o_output2 : Separate<["--"], "output">, Alias<o>;
 def alias_pie_pic_executable: F<"pic-executable">, Alias<pie>;
 def alias_relocatable_r: Flag<["-"], "r">, Alias<relocatable>;
-def alias_rpath_R: Joined<["-"], "R">, Alias<rpath>;
+def alias_rpath_R: JoinedOrSeparate<["-"], "R">, Alias<rpath>;
 def alias_rpath_rpath: J<"rpath=">, Alias<rpath>;
 def alias_script_T: JoinedOrSeparate<["-"], "T">, Alias<script>;
 def alias_shared_Bshareable: F<"Bshareable">, Alias<shared>;




More information about the llvm-commits mailing list