1 ; Test the case when the preferred (larger / more aligned) version of a common 2 ; symbol is located in a module that's not included in the link. 3 4 ; RUN: llvm-as %s -o %t1.o 5 ; RUN: llvm-as %p/Inputs/start-lib-common.ll -o %t2.o 6 7 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \ 8 ; RUN: --plugin-opt=emit-llvm \ 9 ; RUN: -shared %t1.o --start-lib %t2.o --end-lib -o %t3.o 10 ; RUN: llvm-dis %t3.o -o - | FileCheck %s 11 12 @x = common global i32 0, align 4 13 14 ; ToT gold (as of 03/2016) honors --start-lib/--end-lib, drops %t2.o and ends up 15 ; with (i32 align 4) symbol. 16 ; Older gold does not drop %t2.o and ends up with (i32 align 8) symbol. This is 17 ; incorrect behavior, but this test does not verify this in order to support 18 ; both old and new gold. 19 20 ; Check that the common symbol is not dropped completely, which was a regression 21 ; in r262676. 22 ; CHECK: @x = common global i32 0 23