[PATCH] D110609: [CodeGen] Fix wrapping personality symbol on ARM

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 23:31:57 PDT 2021


MaskRay added inline comments.


================
Comment at: lld/test/ELF/arm-lto-wrap-personality.ll:1
+; Wrapped symbols are marked as weak for LTO to inhibit IPO. The ARM backend was
+; previously explicitly marking the personality function as global, so if we
----------------
Move the test to ELF/lto/ and remove `lto-` from the filename


================
Comment at: lld/test/ELF/arm-lto-wrap-personality.ll:10
+
+; RUN: llvm-as -o %t %s
+; RUN: ld.lld -shared --wrap __gxx_personality_v0 %t
----------------
%t.bc


================
Comment at: lld/test/ELF/arm-lto-wrap-personality.ll:11
+; RUN: llvm-as -o %t %s
+; RUN: ld.lld -shared --wrap __gxx_personality_v0 %t
+
----------------
`%t.bc -o %t.so`

Then add `llvm-readelf -s %t.so | FileCheck %s` and check the binding of ther personality symbol.

We should make better use of a test, not just testing that something doesn't crash.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110609/new/

https://reviews.llvm.org/D110609



More information about the llvm-commits mailing list