brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 7a606e9 Raw
43 lines · plain
1// Test that the runtime correctly interposes atexit.2//3// REQUIRES: disabled4//   This test is disabled until a proper atexit interpose can be implemented:5//   the current one assumes that atexit is defined in the dylib that calls it,6//   which is not true in general. See7//   https://github.com/llvm/llvm-project/issues/746418//9// RUN: %clang -c -o %t %s10// RUN: %llvm_jitlink %t11 12	.text13// OnExit destructor resets the test result override to zero.14	.section	.text._ZN6OnExitD2Ev,"axG",@progbits,_ZN6OnExitD2Ev,comdat15	.p2align	4, 0x9016	.type	_ZN6OnExitD2Ev,@function17_ZN6OnExitD2Ev:                         # @_ZN6OnExitD2Ev18	.cfi_startproc19	xorl	%edi, %edi20	jmp	llvm_jitlink_setTestResultOverride@PLT # TAILCALL21	.cfi_endproc22 23// main registers the atexit and sets the test result to one.24	.globl main25	.p2align	4, 0x90                         # -- Begin function main26	.type	main,@function27main:              # @main28	.cfi_startproc29# %bb.0:30	movq	_ZN6OnExitD2Ev@GOTPCREL(%rip), %rdi31	callq	atexit@PLT32	movl	$1, %edi33	callq	llvm_jitlink_setTestResultOverride@PLT34	xorl	%eax, %eax35	retq36.Lfunc_end1:37	.size	main, .Lfunc_end1-main38	.cfi_endproc39                                        # -- End function40	.type	_ZL6onExit,@object              # @_ZL6onExit41	.local	_ZL6onExit42	.comm	_ZL6onExit,1,143