1;; Wrapped symbols are marked as weak for LTO to inhibit IPO. The ARM backend 2;; was previously explicitly marking the personality function as global, so if 3;; we attempted to wrap the personality function, its initial binding would be 4;; weak and then the ARM backend would attempt to change it to global, causing 5;; an error. Verify that the ARM backend no longer does this and we can 6;; successfully wrap the personality symbol. 7 8; REQUIRES: arm 9 10; RUN: llvm-as -o %t.bc %s 11; RUN: ld.lld -shared --wrap __gxx_personality_v0 %t.bc -o %t.so 12; RUN: llvm-readelf --dyn-syms %t.so | FileCheck %s 13 14; CHECK: GLOBAL {{.*}} __wrap___gxx_personality_v0 15;; This should be GLOBAL when PR52004 is fixed. 16; CHECK: WEAK {{.*}} __gxx_personality_v0 17 18target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64" 19target triple = "armv7-none-linux-android" 20 21define i32 @__gxx_personality_v0(...) { 22 ret i32 0 23} 24 25define void @dummy() optnone noinline personality ptr @__gxx_personality_v0 { 26 invoke void @dummy() to label %cont unwind label %lpad 27 28cont: 29 ret void 30 31lpad: 32 %lp = landingpad { ptr, i32 } cleanup 33 resume { ptr, i32 } %lp 34} 35