diff options
author | peter <peter@FreeBSD.org> | 2001-10-29 10:14:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-10-29 10:14:51 +0000 |
commit | 43153baeeccb84d4cdf773078b6c421f4084baed (patch) | |
tree | 9183984587640d8245f4107a92726068860181ef /lib/csu | |
parent | 7f637f2bb2ae5510edd8461a7ccc1ab9bb20c34d (diff) | |
download | FreeBSD-src-43153baeeccb84d4cdf773078b6c421f4084baed.zip FreeBSD-src-43153baeeccb84d4cdf773078b6c421f4084baed.tar.gz |
Update for the new toolchain. ld doesn't provide _GLOBAL_OFFSET_TABLE_
in 2.11.2, so use a relocatable method of calculating gp.
Reviewed by: dfr
Diffstat (limited to 'lib/csu')
-rw-r--r-- | lib/csu/ia64/crt1.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/csu/ia64/crt1.c b/lib/csu/ia64/crt1.c index f8b02ab..b12b4f3 100644 --- a/lib/csu/ia64/crt1.c +++ b/lib/csu/ia64/crt1.c @@ -70,7 +70,14 @@ _start(char **ap, char **argv; char **env; - __asm __volatile("movl gp=_GLOBAL_OFFSET_TABLE_"); + /* Calculate gp */ + __asm __volatile(" \ + movl gp=@gprel(1f) ; \ + ;; ; \ + 1: mov r14=ip ; \ + ;; ; \ + sub gp=r14,gp ; \ + ;; "); argc = * (long *) ap; argv = ap + 1; |