File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 1717# RUN: %lld -arch arm64 -dead_strip -lSystem -U _extern_sym -map %t/thunk.map -o %t/thunk %t/input.o
1818# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/thunk | FileCheck %s
1919
20- ## Check that the thunks appear in the map file and that everything is sorted by address
21- # Because of the `.space` instructions, there will end up being a lot of dead symbols in the
22- # linker map (linker map will be ~2.7GB). So to avoid the test trying to (slowly) match regex
23- # across all the ~2.7GB of the linker map - generate a version of the linker map without dead symbols.
24- # RUN: awk '/# Dead Stripped Symbols:/ {exit} {print}' %t/thunk.map > %t/thunk_no_dead_syms.map
25-
26- # RUN: FileCheck %s --input-file %t/thunk_no_dead_syms.map --check-prefix=MAP
20+ # RUN: FileCheck %s --input-file %t/thunk.map --check-prefix=MAP
2721
2822# MAP: 0x{{[[:xdigit:]]+}} {{.*}} _b
2923# MAP-NEXT: 0x{{[[:xdigit:]]+}} {{.*}} _c
@@ -339,7 +333,11 @@ _main:
339333 ret
340334
341335.section __TEXT,__cstring
342- .space 0x4000000
336+ # The .space below has to be composed of non-zero characters. Otherwise, the
337+ # linker will create a symbol for every '0' in the section, leading to
338+ # dramatic memory usage and a huge linker map file
339+ .space 0x4000000 , 'A'
340+
343341
344342.section __TEXT,__lcxx_override,regular,pure_instructions
345343
You can’t perform that action at this time.
0 commit comments