PERFORCE change 31743 for review

Peter Wemm peter at FreeBSD.org
Fri May 23 17:34:07 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=31743

Change 31743 by peter at peter_hammer on 2003/05/23 17:33:48

	preserve %rdi across _rtld call

Affected files ...

.. //depot/projects/hammer/libexec/rtld-elf/amd64/rtld_start.S#7 edit

Differences ...

==== //depot/projects/hammer/libexec/rtld-elf/amd64/rtld_start.S#7 (text+ko) ====

@@ -32,12 +32,14 @@
 .rtld_start:
 	xorq	%rbp,%rbp		# Clear frame pointer for good form
 	subq	$16,%rsp		# A place to store exit procedure addr
+	movq	%rdi,%r12
 	movq	%rsp,%rsi		# save address of exit proc
 	movq	%rsp,%rdx		# construct address of obj_main
 	addq	$8,%rdx
 	call	_rtld at PLT		# Call rtld(sp); returns entry point
 	popq	%rsi			# Get exit procedure address
 	addq	$8,%rsp			# Ignore obj_main
+	movq	%r12,%rdi		# *ap
 /*
  * At this point, %rax contains the entry point of the main program, and
  * %rdx contains a pointer to a termination function that should be


More information about the p4-projects mailing list