riscv: Fix global construction

Update #3433.
This commit is contained in:
Sebastian Huber
2018-06-28 08:21:44 +02:00
parent 694e79a0b7
commit 995e91e847
3 changed files with 7 additions and 6 deletions

View File

@@ -20,7 +20,7 @@
/* FIXME: These defines are a blatant hack */ /* FIXME: These defines are a blatant hack */
#if defined(__USE_INIT_FINI__) #if defined(__USE_INIT_FINI__)
#if defined(__ARM_EABI__) #if defined(__ARM_EABI__) || defined(__riscv)
#define FINI_SYMBOL __libc_fini_array #define FINI_SYMBOL __libc_fini_array
#else #else
#define FINI_SYMBOL _fini #define FINI_SYMBOL _fini

View File

@@ -97,14 +97,15 @@ RTEMS_STATIC_ASSERT(
*/ */
extern char bsp_start_vector_table_begin[]; extern char bsp_start_vector_table_begin[];
void init(void); void _init(void);
void fini(void);
void _init() void _fini(void);
void _init(void)
{ {
} }
void _fini() void _fini(void)
{ {
} }

View File

@@ -29,7 +29,7 @@
* initialization this target and compiler version uses. * initialization this target and compiler version uses.
*/ */
#if defined(__USE_INIT_FINI__) #if defined(__USE_INIT_FINI__)
#if defined(__ARM_EABI__) #if defined(__ARM_EABI__) || defined(__riscv)
#define INIT_NAME __libc_init_array #define INIT_NAME __libc_init_array
#else #else
#define INIT_NAME _init #define INIT_NAME _init