brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 6b8e17d Raw
47 lines · plain
1// Test that __orc_rt_macho_jit_dlopen resets the state of the data sections.2//3// RUN: %clang -c -o %t.main.o %p/Inputs/dlopen-dlclose-x2.S4// RUN: %clang -c -o %t.inits.o %s5// RUN: %llvm_jitlink \6// RUN:   -alias Platform:_dlopen=___orc_rt_macho_jit_dlopen \7// RUN:   -alias Platform:_dlclose=___orc_rt_macho_jit_dlclose \8// RUN:   %t.main.o -jd inits %t.inits.o -lmain | FileCheck %s9 10// CHECK: entering main11// CHECK-NEXT: X = 1, Y = 212// CHECK-NEXT: X = 1, Y = 213// CHECK-NEXT: leaving main14 15	.section	__TEXT,__text,regular,pure_instructions16	.build_version macos, 13, 0	sdk_version 13, 017	.section	__TEXT,__StaticInit,regular,pure_instructions18	.p2align	4, 0x9019_initializer:20	movq	_X(%rip), %rsi21	addq	$1, %rsi22	movq	%rsi, _X(%rip)23	movq	_Y(%rip), %rdx24	addq	$1, %rdx25	movq	%rdx, _Y(%rip)26	leaq	L_.str(%rip), %rdi27	xorl	%eax, %eax28	jmp	_printf29 30	.section	__TEXT,__cstring,cstring_literals31L_.str:32	.asciz	"X = %zu, Y = %zu\n"33 34	.globl	_X                              ## @X35.zerofill __DATA,__common,_X,8,336	.section	__DATA,__data37	.globl	_Y                              ## @Y38	.p2align	339_Y:40	.quad	1                               ## 0x141 42	.section	__DATA,__mod_init_func,mod_init_funcs43	.p2align	344	.quad	_initializer45 46.subsections_via_symbols47