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
This commit is contained in:
parent
14a55adf36
commit
16ef3f735a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85678
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user