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 17
17
# RUN: %lld -arch arm64 -dead_strip -lSystem -U _extern_sym -map %t/thunk.map -o %t/thunk %t/input.o
18
18
# RUN: llvm-objdump --no-print-imm-hex -d --no-show-raw-insn %t/thunk | FileCheck %s
19
19
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
27
21
28
22
# MAP: 0x{{[[:xdigit:]]+}} {{.*}} _b
29
23
# MAP-NEXT: 0x{{[[:xdigit:]]+}} {{.*}} _c
@@ -339,7 +333,11 @@ _main:
339
333
ret
340
334
341
335
.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
+
343
341
344
342
.section __TEXT,__lcxx_override,regular,pure_instructions
345
343
You can’t perform that action at this time.
0 commit comments