[lld] [lld-macho] Fix compatibility between --icf=safe_thunks and --keep-icf-stabs (PR #116687)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 15:27:45 PST 2024


================
@@ -20,6 +20,59 @@
 ; VERIFY-STABS:  N_FUN{{.*}}_func_A
 ; VERIFY-STABS:  N_FUN{{.*}}_take_func_addr
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;; Check safe_thunks ICF + keeping STABS entries ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Check scenario with where we do safe_thunks ICF and also generate STABS entries
+; RUN: %lld -arch arm64 -lSystem --icf=safe_thunks --keep-icf-stabs -dylib -o %t/a_thunks.dylib %t/a.o
+; RUN: dsymutil -s %t/a_thunks.dylib > %t/a_thunks.txt
----------------
alx32 wrote:

Which one ? There are 2 other `RUN's` that append to the file ( ex: `a_thunks.dSYM >> %t/a_thunks.txt` )

The reason for append + test is to test that the offsets are consistent across the multiple calls (ex: `MERGED_FUN_ADDR`).

https://github.com/llvm/llvm-project/pull/116687


More information about the llvm-commits mailing list