mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2024-12-28 04:23:36 +01:00
Merge pull request 'kernel: simplify PIE support' (#33) from Yatis/gint:dev into dev
Reviewed-on: https://git.planet-casio.com/Lephenixnoir/gint/pulls/33
This commit is contained in:
commit
a324ce792a
5 changed files with 14 additions and 12 deletions
|
@ -70,11 +70,11 @@ SECTIONS
|
||||||
|
|
||||||
_gint_exch_start = . ;
|
_gint_exch_start = . ;
|
||||||
KEEP(*(.gint.exch))
|
KEEP(*(.gint.exch))
|
||||||
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
|
_gint_exch_end = . ;
|
||||||
|
|
||||||
_gint_tlbh_start = . ;
|
_gint_tlbh_start = . ;
|
||||||
KEEP(*(.gint.tlbh))
|
KEEP(*(.gint.tlbh))
|
||||||
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
|
_gint_tlbh_end = . ;
|
||||||
|
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
*(C P)
|
*(C P)
|
||||||
|
|
|
@ -59,11 +59,11 @@ SECTIONS
|
||||||
|
|
||||||
_gint_exch_start = . ;
|
_gint_exch_start = . ;
|
||||||
KEEP(*(.gint.exch))
|
KEEP(*(.gint.exch))
|
||||||
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
|
_gint_exch_end = . ;
|
||||||
|
|
||||||
_gint_tlbh_start = . ;
|
_gint_tlbh_start = . ;
|
||||||
KEEP(*(.gint.tlbh))
|
KEEP(*(.gint.tlbh))
|
||||||
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
|
_gint_tlbh_end = . ;
|
||||||
|
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
} > rom
|
} > rom
|
||||||
|
|
|
@ -68,12 +68,12 @@ SECTIONS
|
||||||
. = ALIGN(0x10);
|
. = ALIGN(0x10);
|
||||||
_gint_exch_start = . ;
|
_gint_exch_start = . ;
|
||||||
*(.gint.exch)
|
*(.gint.exch)
|
||||||
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
|
_gint_exch_end = . ;
|
||||||
|
|
||||||
. = ALIGN(0x10);
|
. = ALIGN(0x10);
|
||||||
_gint_tlbh_start = . ;
|
_gint_tlbh_start = . ;
|
||||||
*(.gint.tlbh)
|
*(.gint.tlbh)
|
||||||
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
|
_gint_tlbh_end = . ;
|
||||||
|
|
||||||
*(.text .text.*)
|
*(.text .text.*)
|
||||||
} > ram AT> bin
|
} > ram AT> bin
|
||||||
|
|
|
@ -76,9 +76,15 @@ void kinit(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Event handler entry points */
|
/* Event handler entry points */
|
||||||
|
extern uint32_t gint_exch_start;
|
||||||
|
extern uint32_t gint_exch_end;
|
||||||
|
extern uint32_t gint_tlbh_start;
|
||||||
|
extern uint32_t gint_tlbh_end;
|
||||||
void *inth_entry = isSH3() ? gint_inth_7705 : gint_inth_7305;
|
void *inth_entry = isSH3() ? gint_inth_7705 : gint_inth_7305;
|
||||||
uint32_t exch_size = (uint32_t)&gint_exch_size;
|
uint32_t exch_size = \
|
||||||
uint32_t tlbh_size = (uint32_t)&gint_tlbh_size;
|
(uint32_t)&gint_exch_end - (uint32_t)&gint_exch_start;
|
||||||
|
uint32_t tlbh_size = \
|
||||||
|
(uint32_t)&gint_tlbh_end - (uint32_t)&gint_tlbh_start;
|
||||||
|
|
||||||
/* Load the event handler entry points into memory */
|
/* Load the event handler entry points into memory */
|
||||||
memcpy((void *)VBR + 0x100, gint_exch, exch_size);
|
memcpy((void *)VBR + 0x100, gint_exch, exch_size);
|
||||||
|
|
|
@ -11,8 +11,4 @@ void gint_tlbh(void);
|
||||||
void gint_inth_7705(void);
|
void gint_inth_7705(void);
|
||||||
void gint_inth_7305(void);
|
void gint_inth_7305(void);
|
||||||
|
|
||||||
/* Size of exception and TLB handlers */
|
|
||||||
extern char gint_exch_size;
|
|
||||||
extern char gint_tlbh_size;
|
|
||||||
|
|
||||||
#endif /* GINT_CORE_VBR */
|
#endif /* GINT_CORE_VBR */
|
||||||
|
|
Loading…
Reference in a new issue