summaryrefslogtreecommitdiffstats
path: root/lib/csu
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2001-10-29 10:14:51 +0000
committerpeter <peter@FreeBSD.org>2001-10-29 10:14:51 +0000
commit43153baeeccb84d4cdf773078b6c421f4084baed (patch)
tree9183984587640d8245f4107a92726068860181ef /lib/csu
parent7f637f2bb2ae5510edd8461a7ccc1ab9bb20c34d (diff)
downloadFreeBSD-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.c9
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;
OpenPOWER on IntegriCloud