[lld] r205391 - [ELF] Add -z muldefs option.
Rui Ueyama
ruiu at google.com
Tue Apr 1 21:12:35 PDT 2014
On Tue, Apr 1, 2014 at 8:57 PM, Shankar Easwaran <shankarke at gmail.com>wrote:
> Author: shankare
> Date: Tue Apr 1 22:57:37 2014
> New Revision: 205391
>
> URL: http://llvm.org/viewvc/llvm-project?rev=205391&view=rev
> Log:
> [ELF] Add -z muldefs option.
>
> This adds -z muldefs option which is widely used over
> --allow-multiple-definition.
>
> This option is supported by the GNU linker.
>
> Modified:
> lld/trunk/lib/Driver/GnuLdDriver.cpp
> lld/trunk/test/elf/allowduplicates.objtxt
>
> Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=205391&r1=205390&r2=205391&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
> +++ lld/trunk/lib/Driver/GnuLdDriver.cpp Tue Apr 1 22:57:37 2014
> @@ -440,6 +440,16 @@ bool GnuLdDriver::parse(int argc, const
> groupStack.pop();
> break;
>
> + case OPT_z: {
> + StringRef extOpt = inputArg->getValue();
> + if (extOpt == "muldefs")
> + ctx->setAllowDuplicates(true);
> + else
> + diagnostics << "warning: ignoring unknown argument for -z: " <<
> extOpt
> + << "\n";
> + break;
> + }
> +
> case OPT_INPUT:
> case OPT_l: {
> bool isDashlPrefix = (inputArg->getOption().getID() == OPT_l);
>
> Modified: lld/trunk/test/elf/allowduplicates.objtxt
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/allowduplicates.objtxt?rev=205391&r1=205390&r2=205391&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/allowduplicates.objtxt (original)
> +++ lld/trunk/test/elf/allowduplicates.objtxt Tue Apr 1 22:57:37 2014
> @@ -1,8 +1,11 @@
> -# RUN: lld -flavor gnu -target x86_64 --allow-multiple-definition -r %s \
> -# RUN: --output-filetype=yaml | FileCheck %s
> +# RUN: lld -flavor gnu -target x86_64 --allow-multiple-definition %s \
> +# RUN: --output-filetype=yaml --noinhibit-exec | FileCheck %s
> #
> -# RUN: not lld -flavor gnu -target x86_64 -r %s --output-filetype=yaml
> 2>&1 \
> -# RUN: | FileCheck -check-prefix=ERROR %s
> +# RUN: not lld -flavor gnu -target x86_64 %s --output-filetype=yaml \
> +# RUN: --noinhibit-exec 2>&1 | FileCheck -check-prefix=ERROR %s
> +#
> +# RUN: lld -flavor gnu -target x86_64 -z muldefs %s \
> +# RUN: --noinhibit-exec --output-filetype=yaml | FileCheck %s
>
Why do you now need --noinhibit-exec?
>
> ---
> defined-atoms:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140401/a1647124/attachment.html>
More information about the llvm-commits
mailing list