bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/19976] New: Can't resolve symbol from an ar archive needed plu


From: cao.zhong1 at gmail dot com
Subject: [Bug gold/19976] New: Can't resolve symbol from an ar archive needed plugin processing when in replacement phrase
Date: Thu, 21 Apr 2016 05:04:41 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=19976

            Bug ID: 19976
           Summary: Can't resolve symbol from an ar archive needed plugin
                    processing when in replacement phrase
           Product: binutils
           Version: 2.27 (HEAD)
            Status: NEW
          Severity: minor
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: cao.zhong1 at gmail dot com
                CC: ian at airs dot com
  Target Milestone: ---

Created attachment 9211
  --> https://sourceware.org/bugzilla/attachment.cgi?id=9211&action=edit
Test case for described scenario

Gold push back archives for a rescan if there are some objects claimed by LTO
plugins. But it will lead to unrecognized object file if this archive should be
process by plugins too.

For example, 32.o was a LLVM IR and referenced __mulodi4 in
libcompiler_rt-extras.a, a case simplified from AOSP building with flto.
libcompiler_rt-extras.a contains LLVM IR objects instead of ELF.

clang++ -O0 -flto -ftrapv -m32 -o main 32.o libcompiler_rt-extras.a

Above command will produce a error message:

clang++ -O0 -flto -ftrapv -m32 -o main 32.o libcompiler_rt-extras.a
/home/jacky/bin/ld: error: libcompiler_rt-extras.a: member at 86 is not an ELF
object
/tmp/lto-llvm-795d50.o:ld-temp.o:function main: error: undefined reference to
'__mulodi4'
clang-3.9: error: linker command failed with exit code 1 (use -v to see
invocation)
gmake: *** [main] Error 1

It will bypass by command:
clang++ -O0 -flto -ftrapv -m32 -Wl,-u,__mulodi4 -o main 32.o
libcompiler_rt-extras.a

Is it possible that gold figure out using plugin to claim this archive by
itself?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]