diff options
author | Visa Hankala <visa@cvs.openbsd.org> | 2021-02-17 14:42:21 +0000 |
---|---|---|
committer | Visa Hankala <visa@cvs.openbsd.org> | 2021-02-17 14:42:21 +0000 |
commit | f1a0858385acee16e8eacd25db4abdb764716db2 (patch) | |
tree | fd782c1f01accf913253fc6a319fbd42e540f89e /sys/arch/loongson | |
parent | f3413aae78048ef29caa1a31662ca0140aa69db7 (diff) |
Skip gp initialization in loongson bootblocks
The loongson bootblocks are compiled with -mno-abicalls and do not use
gp-relative addressing.
A similar change has been made to the mips64 kernels recently.
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r-- | sys/arch/loongson/stand/boot/ld.script | 1 | ||||
-rw-r--r-- | sys/arch/loongson/stand/boot/start.S | 3 |
2 files changed, 1 insertions, 3 deletions
diff --git a/sys/arch/loongson/stand/boot/ld.script b/sys/arch/loongson/stand/boot/ld.script index 50977c3f8df..e32c26dfbd9 100644 --- a/sys/arch/loongson/stand/boot/ld.script +++ b/sys/arch/loongson/stand/boot/ld.script @@ -12,7 +12,6 @@ SECTIONS .text : { *(.text .text.* .gnu.linkonce.t.*) } PROVIDE (etext = .); .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) } - _gp = ALIGN(16) + 0x7ff0; .data : { *(.data .data.* .gnu.linkonce.d.*) } PROVIDE (edata = .); .sbss : { *(.sbss .sbss.* .gnu.linkonce.sb.* .scommon) } diff --git a/sys/arch/loongson/stand/boot/start.S b/sys/arch/loongson/stand/boot/start.S index 4fd44b6ebb5..62a8731a748 100644 --- a/sys/arch/loongson/stand/boot/start.S +++ b/sys/arch/loongson/stand/boot/start.S @@ -1,4 +1,4 @@ -/* $OpenBSD: start.S,v 1.3 2018/04/20 14:36:42 visa Exp $ */ +/* $OpenBSD: start.S,v 1.4 2021/02/17 14:42:20 visa Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -35,7 +35,6 @@ pmon_sp: .ent __start, 0 __start: LA t0, __start - FRAMESZ(CF_SZ) - LA gp, _gp PTR_S ra, pmon_ra # save pmon return address PTR_S sp, pmon_sp # and stack move sp, t0 |