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

            Bug ID: 34572
           Summary: --start-lib/--end-lib do not work with linker plugin
                    LTO
           Product: binutils
           Version: 2.48 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: npopov at redhat dot com
  Target Milestone: ---

echo "int main() {}" > test.c
clang -flto test.c -c -o test.o
$HOME/binutils-install/bin/ld.bfd -m elf_x86_64 -o result \
    -plugin=/usr/lib64/LLVMgold.so \
    --start-lib test.o --end-lib

This results in: /home/npopov/binutils-install/bin/ld.bfd: internal error
ldlang.c 8396

I encountered this when porting LLVM gold plugin tests from ld.gold to ld.bfd.
The error I originally ran into was

> unknown architecture of input file 
> `/home/npopov/repos/llvm-project/build/test/tools/gold/X86/Output/thinlto_weak_library.ll.tmp3.o
>  (symbol from plugin)' is incompatible with i386:x86-64 output

but when trying to create a minimal reproducer I ran into the aforementioned
internal error.

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

Reply via email to