mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-10 09:40:53 +01:00
Move ctors function pointers to .data section, and add .init_array, to fix compilation on Linux
This commit is contained in:
parent
af28b47c72
commit
b6e39e1a32
@ -45,18 +45,15 @@ SECTIONS {
|
||||
.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
*(.bss .bss.*)
|
||||
__beginning_of_section_ctors = .; /* create symbol for start of section */
|
||||
KEEP(*(.ctors .init_array)) /* .ctors is used on macOS, .init_array on Linux */
|
||||
__end_of_section_ctors = .; /* create symbol for end of section */
|
||||
}
|
||||
|
||||
.eh_frame ALIGN(CONSTANT(COMMONPAGESIZE)) : {
|
||||
KEEP (*(.eh_frame))
|
||||
}
|
||||
|
||||
.ctorss ALIGN(CONSTANT(COMMONPAGESIZE)) : {
|
||||
__beginning_of_section_ctors = .; /* create symbol for start of section */
|
||||
KEEP (*(.ctors))
|
||||
__end_of_section_ctors = .; /* create symbol for end of section */
|
||||
}
|
||||
|
||||
.rela (INFO) : {
|
||||
*(.rela .rela.*)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user