brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 56b866f Raw
61 lines · plain
1# REQUIRES: x862 3# RUN: llvm-mc -triple=x86_64-windows-msvc %s -filetype=obj -o %t.obj4# RUN: lld-link -lldmap:%t.map -out:%t.exe -opt:ref -entry:main %t.obj -verbose 2>&1 | FileCheck %s5# RUN: FileCheck %s --check-prefix=MAP --input-file=%t.map6 7# CHECK:      Discarded unused18# CHECK-NEXT: Discarded unused29# CHECK-NOT: Discarded10 11# MAP: In Symbol12# MAP: gc-dwarf.s.tmp.obj:(.text)13# MAP: {{ main$}}14# MAP: gc-dwarf.s.tmp.obj:(.text)15# MAP: {{ used$}}16 17	.def	 @feat.00; .scl	3; .type	0; .endef18	.globl	@feat.0019.set @feat.00, 020 21	.def	 main; .scl	2; .type	32; .endef22	.section	.text,"xr",one_only,main23	.globl	main24main:25	callq used26	xorl	%eax, %eax27	retq28 29	.def	 used; .scl	2; .type	32; .endef30	.section	.text,"xr",one_only,used31	.globl	used32used:33	retq34 35 36	.def	 unused1; .scl	2; .type	32; .endef37	.section	.text,"xr",one_only,unused138	.globl	unused139unused1:40	retq41 42	.def	 unused2; .scl	2; .type	32; .endef43	.section	.text,"xr",one_only,unused244	.globl	unused245unused2:46	retq47 48# This isn't valid DWARF, but LLD doesn't care. Make up some data that49# references the functions above.50.section .debug_info,"r"51.long main@IMGREL52.long unused1@IMGREL53.long unused2@IMGREL54 55# Similarly, .eh_frame unwind info should not keep functions alive. Again, this56# is not valid unwind info, but it doesn't matter for testing purposes.57.section .eh_frame,"r"58.long main@IMGREL59.long unused1@IMGREL60.long unused2@IMGREL61