[lld] [ARM][LLD] Rewrite thunk tests to make output smaller [NFC] (PR #202551)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 14 21:46:30 PDT 2026
================
@@ -1,13 +1,20 @@
// REQUIRES: arm
-// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi %s -o %t
-// RUN: ld.lld %t --shared --icf=all -o %t.so
-// The output file is large, most of it zeroes. We dissassemble only the
-// parts we need to speed up the test and avoid a large output file
-// RUN: llvm-objdump --no-print-imm-hex -d %t.so --start-address=0x2000000 --stop-address=0x2000018 | FileCheck --check-prefix=CHECK1 %s
-// RUN: llvm-objdump --no-print-imm-hex -d %t.so --start-address=0x2800004 --stop-address=0x2800034 | FileCheck --check-prefix=CHECK2 %s
-// RUN: llvm-objdump --no-print-imm-hex -d %t.so --start-address=0x4000000 --stop-address=0x4000010 | FileCheck --check-prefix=CHECK3 %s
-// RUN: llvm-objdump --no-print-imm-hex -d %t.so --start-address=0x4000010 --stop-address=0x4000100 --triple=armv7a-linux-gnueabihf | FileCheck --check-prefix=CHECK4 %s
-// RUN: rm %t.so
+// RUN: rm -rf %t && split-file %s %t && cd %t
+// RUN: llvm-mc -arm-add-build-attributes -filetype=obj -triple=thumbv7a-none-linux-gnueabi a.s -o a.o
+// RUN: ld.lld a.o --shared --icf=all -o a.so --script=a.lds --print-map --print-icf-sections
+// RUN: llvm-objdump --no-show-raw-insn --no-print-imm-hex -d a.so | FileCheck %s
+// RUN: rm a.so
+
+//--- a.lds
+SECTIONS {
+ .dynsym 0x1ff0000 : AT(0x1ff0000) { *(.dynsym) }
----------------
MaskRay wrote:
Since we have LMA==VMA for every section these `AT(...)` can be removed
https://github.com/llvm/llvm-project/pull/202551
More information about the llvm-commits
mailing list