From 43153baeeccb84d4cdf773078b6c421f4084baed Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 29 Oct 2001 10:14:51 +0000 Subject: 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 --- lib/csu/ia64/crt1.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lib/csu') 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; -- cgit v1.1