mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
61c4e41480
The plugin API doesn't have the notion of linkonce, only weak. It is up to the plugin to figure out if a symbol used only for the symbol table can be dropped. In particular, it has to avoid dropping a linkonce_odr selected by gold if there is also a weak_odr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219188 91177308-0d34-0410-b5e6-96231b3b80d8
20 lines
552 B
LLVM
20 lines
552 B
LLVM
; RUN: llvm-as %s -o %t.o
|
|
; RUN: llvm-as %p/Inputs/linkonce-weak.ll -o %t2.o
|
|
|
|
; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
|
|
; RUN: --plugin-opt=emit-llvm \
|
|
; RUN: -shared %t.o %t2.o -o %t3.o
|
|
; RUN: llvm-dis %t3.o -o - | FileCheck %s
|
|
|
|
; RUN: ld -plugin %llvmshlibdir/LLVMgold.so \
|
|
; RUN: --plugin-opt=emit-llvm \
|
|
; RUN: -shared %t2.o %t.o -o %t3.o
|
|
; RUN: llvm-dis %t3.o -o - | FileCheck %s
|
|
|
|
define linkonce_odr void @f() {
|
|
ret void
|
|
}
|
|
|
|
; Test that we get a weak_odr regardless of the order of the files
|
|
; CHECK: define weak_odr void @f() {
|