[LLVMdev] Error with Gold Linker during LTO

Shankar Easwaran shankare at codeaurora.org
Fri May 30 13:40:34 PDT 2014


Hi Rafael,

Just pointing out, that this test fails with x86_64 with trunk.

http://llvm.org/bugs/show_bug.cgi?id=19888

Thanks

Shankar Easwaran

On 5/30/2014 2:57 PM, Rafael EspĂ­ndola wrote:
> Sorry, I had understood that the linker was crashing, not the generated program.
>
> I can reproduce the issue now.
>
> On 30 May 2014 15:48, Daniel Stewart <stewartd at codeaurora.org> wrote:
>> So you see the issue as well in ARM? When doing a
>>
>> objdump -D weakMainO1.exe | grep -A 10 "<_ZN1C13caller_methodEv>:"
>>
>> I see:
>>
>> 00008b88 <_ZN1C13caller_methodEv>:
>>      8b88:       e92d4800        push    {fp, lr}
>>      8b8c:       e1a0b00d        mov     fp, sp
>>      8b90:       e24dd008        sub     sp, sp, #8
>>      8b94:       e58d0004        str     r0, [sp, #4]
>>      8b98:       e59d0004        ldr     r0, [sp, #4]
>>      8b9c:       ebffdd17        bl      0 <__preinit_array_end>
>>      8ba0:       e1a0d00b        mov     sp, fp
>>      8ba4:       e8bd4800        pop     {fp, lr}
>>      8ba8:       e12fff1e        bx      lr
>>
>> where the bl 0 causes a seg fault.
>>
>> I'll check x86_64, but currently don't have that setup, so it'll take me a little bit of time to check.
>>
>> -----Original Message-----
>> From: Rafael EspĂ­ndola [mailto:rafael.espindola at gmail.com]
>> Sent: Friday, May 30, 2014 2:05 PM
>> To: Daniel Stewart
>> Cc: LLVM Developers Mailing List
>> Subject: Re: Error with Gold Linker during LTO
>>
>>> clang++ -O1 -o weakMainO1.exe    -flto     -mcpu=cortex-a15 -mllvm
>>> -debug-only=inline    -static weakMain.cpp weakImpl.o -v
>>> -Wl,-plugin-opt=-debug-only=inline -Wl,-fuse-ld=gold
>>> -Wl,-plugin-opt=also-emit-llvm -Wl,-plugin-opt=obj-path=. >& O1.log
>> Those command line options don't exist on trunk.
>>
>> The following works for me:
>>
>> $ clang++ -O0 weakImpl.cpp -o weakImpl.o -c
>> $ clang++ -O1 -o weakMainO1.exe    -flto     -static weakMain.cpp weakImpl.o
>>
>> Do you also see the issue with x86_64?
>>
>> Cheers,
>> Rafael
>>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140530/d4a1632d/attachment.html>


More information about the llvm-dev mailing list