Date: Fri, 23 May 2003 19:58:08 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 31756 for review Message-ID: <200305240258.h4O2w8Bx013587@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=31756 Change 31756 by peter@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@PLT # Transfer control to the binder /* Now %rax contains the entry point of the function being called. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200305240258.h4O2w8Bx013587>