diff options
author | dfr <dfr@FreeBSD.org> | 2001-10-11 12:33:05 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2001-10-11 12:33:05 +0000 |
commit | f075c7df77137ca0e07add5b10ac3aa165cef4fa (patch) | |
tree | fd512fad4951323175b78a5535a867eb5e752cfd /lib | |
parent | f16813dcd571a9164315524f59fdfea6696b00d6 (diff) | |
download | FreeBSD-src-f075c7df77137ca0e07add5b10ac3aa165cef4fa.zip FreeBSD-src-f075c7df77137ca0e07add5b10ac3aa165cef4fa.tar.gz |
Change to track the new calling convention for execve. This version only
needs one line of assembler to initialise gp.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/csu/ia64/crt1.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/lib/csu/ia64/crt1.c b/lib/csu/ia64/crt1.c index 16efd37..f8b02ab 100644 --- a/lib/csu/ia64/crt1.c +++ b/lib/csu/ia64/crt1.c @@ -60,25 +60,9 @@ extern int etext; char **environ; char *__progname = ""; -__asm (" - .text - .global _start - .proc _start -_start: - alloc r14=ar.pfs,0,0,3,0 ;; - mov out0=sp - mov out1=r14 - mov out2=r15 - mov r14=15 ;; - andcm sp=sp,r14 ;; - add sp=-16,sp - movl gp=_GLOBAL_OFFSET_TABLE_ - br.call.sptk rp=_start2 - .endp _start"); - /* The entry function. */ void -_start2(char **ap, +_start(char **ap, struct ps_strings *ps_strings, void (*cleanup)(void)) { @@ -86,6 +70,8 @@ _start2(char **ap, char **argv; char **env; + __asm __volatile("movl gp=_GLOBAL_OFFSET_TABLE_"); + argc = * (long *) ap; argv = ap + 1; env = ap + 2 + argc; |