Replace absolute addressing in the call instructions with position-independend

calls. This eliminates TEXTREL from libc, making its text segment relocatable.

PR:	i386/85242
Approved by:	kan (mentor)
MFC after:	1 month
This commit is contained in:
kib 2006-06-05 14:59:33 +00:00
parent 4f317e1576
commit 4de8a3e010

View File

@ -41,10 +41,11 @@ __FBSDID("$FreeBSD$");
ENTRY(_ctx_start)
popl %eax /* get start function */
call *%eax /* call start function */
PIC_PROLOGUE
movl %esi, %esp /*
* setup stack for completion routine;
* ucp is now at top of stack
*/
call _ctx_done /* should never return */
call abort /* fubar */
call PIC_PLT(_ctx_done) /* should never return */
call PIC_PLT(abort) /* fubar */
ret