From f1a0858385acee16e8eacd25db4abdb764716db2 Mon Sep 17 00:00:00 2001 From: Visa Hankala Date: Wed, 17 Feb 2021 14:42:21 +0000 Subject: 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. --- sys/arch/loongson/stand/boot/ld.script | 1 - sys/arch/loongson/stand/boot/start.S | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/arch/loongson') 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 -- cgit v1.2.3