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:
Konstantin Belousov 2006-06-05 14:59:33 +00:00
parent e257c20ec1
commit 3d5fa0356e

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