Hi all, Which are the command-line options available to pass linker script, library path etc.. to lld? I see minimal options listed, when i say, lld -flavor gnu -help Thanks in advance, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150209/e7a6f7b8/attachment.html>
In the GNU flavour, you should just try it as you would do it in GNU ld. Please note, however, that support for linker scripts in LLD is still in its infancy and only simple linker script commands that deal with files are working (GROUP, SEARCH_DIR, OUTPUT). Both GNU ld and LLD (when using the GNU flavour), whenever they do not recognise an input file format, will read the input file as an "implicit linker script". This implicit linker script will be read *in addition to* the internal default linker script that sets linker behaviour. These are used, for example, in GLIBC to add search paths and are very simple and already supported by LLD. These implicit linker scripts can appear multiple times in the linker command line in the same way as you specify multiple linker inputs. For example: lld-gnu input1.o input2.o linkerscript1.txt linkerscript2.txt -o test However, there are linker scripts commands that can only appear once (such as the SECTIONS command). If you want to use such commands, you must supply your own linker script name after the "-T" option to override the default linker script, only once: lld-gnu -T linkerscript.txt (...) However, currently, these commands are still not supported in LLD. Best regards, Rafael Auler On Mon, Feb 9, 2015 at 5:25 AM, shridevi Bellatti <shridevinb at gmail.com> wrote:> Hi all, > > > Which are the command-line options available to pass linker script, > library path etc.. to lld? I see minimal options listed, when i say, > lld -flavor gnu -help > > Thanks in advance, > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150218/01dd1acd/attachment.html>
Thanks Rafael On Thu, Feb 19, 2015 at 2:09 AM, Rafael Auler <rafaelauler at gmail.com> wrote:> In the GNU flavour, you should just try it as you would do it in GNU ld. > Please note, however, that support for linker scripts in LLD is still in > its infancy and only simple linker script commands that deal with files are > working (GROUP, SEARCH_DIR, OUTPUT). > > Both GNU ld and LLD (when using the GNU flavour), whenever they do not > recognise an input file format, will read the input file as an "implicit > linker script". This implicit linker script will be read *in addition to* > the internal default linker script that sets linker behaviour. These are > used, for example, in GLIBC to add search paths and are very simple and > already supported by LLD. These implicit linker scripts can appear multiple > times in the linker command line in the same way as you specify multiple > linker inputs. For example: > > lld-gnu input1.o input2.o linkerscript1.txt linkerscript2.txt -o test > > However, there are linker scripts commands that can only appear once (such > as the SECTIONS command). If you want to use such commands, you must supply > your own linker script name after the "-T" option to override the default > linker script, only once: > > lld-gnu -T linkerscript.txt (...) > > However, currently, these commands are still not supported in LLD. > > Best regards, > Rafael Auler > > On Mon, Feb 9, 2015 at 5:25 AM, shridevi Bellatti <shridevinb at gmail.com> > wrote: > >> Hi all, >> >> >> Which are the command-line options available to pass linker script, >> library path etc.. to lld? I see minimal options listed, when i say, >> lld -flavor gnu -help >> >> Thanks in advance, >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150223/8bbb2c78/attachment.html>