[LLVMbugs] [Bug 24245] New: gnutools on ARM force linking with '--dynamic-linker'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jul 24 05:44:38 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24245

            Bug ID: 24245
           Summary: gnutools on ARM force linking with '--dynamic-linker'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Driver
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kjell.braden at cased.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I'm trying to compile a loader and link it with gnu ld, and I'm trying to
get clang not to pass '--dynamic-linker'. However,
lib/Driver/Tools.cpp:8075 will always pass this, if the binary is
{ARM,Thumb}{,eb}:

>   if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb ||
>       Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb ||
>       (!Args.hasArg(options::OPT_static) &&
>        !Args.hasArg(options::OPT_shared))) {
>     CmdArgs.push_back("-dynamic-linker");
>     CmdArgs.push_back(Args.MakeArgString(
>         D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain)));
>   }


from what I can see in the GCC sources[1], they don't pass -dynamic-linker if
either -static or -shared is set.

[1]
https://github.com/gcc-mirror/gcc/blob/master/gcc/config/arm/linux-elf.h#L67

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150724/eb14b88e/attachment.html>


More information about the llvm-bugs mailing list