PERFORCE change 31756 for review

Peter Wemm peter at FreeBSD.org
Fri May 23 19:58:10 PDT 2003


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

Change 31756 by peter at peter_hammer on 2003/05/23 19:57:24

	Ok, this is pretty messed up.  _rtld_bind() seems to expect this
	to be a byte index into the Elf_Rela table.  For some reason, amd64
	uses it as the Elf_Rela array index.  And of course, its in MI code.
	pre-scale it to make _rtld_bind() happy.

Affected files ...

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

Differences ...

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

@@ -92,6 +92,8 @@
 
 	movq	0x50(%rsp),%rdi		# Fetch obj argument
 	movq	0x58(%rsp),%rsi		# Fetch reloff argument
+	leaq	(%rsi,%rsi,2),%rsi	# multiply by 3
+	leaq	(,%rsi,8),%rsi		# now 8, for 24 (sizeof Elf_Rela)
 
 	call	_rtld_bind at PLT		# Transfer control to the binder
 	/* Now %rax contains the entry point of the function being called. */


More information about the p4-projects mailing list