Merge pull request #295 from KarlK90/gd32vf103-linker-sections

[GD32VF103] Correct linker scripts
This commit is contained in:
Fabien Poussin 2021-09-11 00:10:06 +02:00 committed by GitHub
commit 53db13768e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -103,7 +103,7 @@
#include "riscv_encoding.h"
.text
.section .crt0, "ax"
.global _start
.type _start, @function
_start:

View File

@ -20,6 +20,10 @@ SECTIONS
{
.vectors : ALIGN(4)
{
KEEP (*(SORT_NONE(.crt0)))
/* For 65 to 128 interrupts, the vector table must be 512 byte aligned.
* See: https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html#mtvt */
. = ALIGN(512);
KEEP (*(SORT_NONE(.vectors)))
} > VECTORS_FLASH AT > VECTORS_FLASH_LMA

View File

@ -37,14 +37,11 @@
/*===========================================================================*/
#if !defined(__DOXYGEN__)
.section vectors, "a", %progbits
.section .vectors, "a", %progbits
.globl vector_base
.type vector_base, %object
.option push
.option norelax
# For 65 to 128 interrupts, the base address must have 512 byte alignment.
# https://doc.nucleisys.com/nuclei_spec/isa/core_csr.html#mtvt
.align 9
vector_base:
.word vector0
.word vector1