[llvm-bugs] [Bug 45246] New: Inline assembler doesn't honor ".weak" on PPC

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Mar 18 17:16:15 PDT 2020


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

            Bug ID: 45246
           Summary: Inline assembler doesn't honor ".weak" on PPC
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: isanbard at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

When I try to compile the prodkernel with the integrated assembler for PPC, I
get an error while linking saying that `_zimage_start' is duplicated. It looks
like the `arch/powerpc/boot/crt0.S' file specifies that symbol as ".weak", but
clang turns it into a definition:

$ cat ppc-asm.S
        .text
        .weak   _zimage_start
        .globl  _zimage_start
_zimage_start:
$ clang -target powerpc64-linux-gnu -o /tmp/t.o ../ppc-asm.S -c
$ nm /tmp/t.o
0000000000000000 T _zimage_start

-- 
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/20200319/6a6f6531/attachment.html>


More information about the llvm-bugs mailing list