Improve linker script compatability

This commit is contained in:
Ali Mashtizadeh 2014-09-29 13:24:10 -07:00
parent 0e8b1ecea3
commit dac51c8166

View File

@ -44,7 +44,7 @@ SECTIONS
}
.init :
{
KEEP (*(SORT_NONE(.init)))
KEEP (*(.init))
}
.plt : { *(.plt) *(.iplt) }
.text :
@ -59,7 +59,7 @@ SECTIONS
}
.fini :
{
KEEP (*(SORT_NONE(.fini)))
KEEP (*(.fini))
}
PROVIDE (__etext = .);
PROVIDE (_etext = .);
@ -92,14 +92,14 @@ SECTIONS
.init_array :
{
PROVIDE_HIDDEN (__init_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
KEEP (*(.init_array.* .ctors.*))
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
PROVIDE_HIDDEN (__init_array_end = .);
}
.fini_array :
{
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
KEEP (*(.fini_array.* .dtors.*))
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
PROVIDE_HIDDEN (__fini_array_end = .);
}