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