riscv64: Do not use global pointer register

This commit is contained in:
mintsuki 2023-07-13 04:45:33 +02:00
parent e261a96fa4
commit bc1896c5bb
3 changed files with 2 additions and 8 deletions

View File

@ -195,6 +195,7 @@ endif
ifeq ($(TARGET),uefi-riscv64)
override LDFLAGS_FOR_TARGET += \
-m elf64lriscv \
--no-relax \
-static \
-pie \
--no-dynamic-linker \

View File

@ -3,10 +3,6 @@
.global efi_main
.extern uefi_entry
efi_main:
.option push
.option norelax
lla gp, __global_pointer$
.option pop
mv fp, zero
mv ra, zero
j uefi_entry

View File

@ -1,5 +1,5 @@
OUTPUT_FORMAT(elf64-littleriscv)
OUTPUT_ARCH(riscv)
OUTPUT_ARCH(riscv:rv64)
ENTRY(_start)
PHDRS
@ -60,9 +60,6 @@ SECTIONS
data_begin = .;
*(.data .data.*)
__global_pointer$ = . + 0x800;
*(.sdata .sdata.*)
*(.sbss .sbss.*)
*(.bss .bss.*)
*(COMMON)
data_end = .;