mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2024-11-30 23:40:24 +00:00
* elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
SymbianOS. * emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so as to include .ARM.exidx$${Base,Limit}. * ld/scripttempl/armbpabi.sc: Move .plt to end of text segment. Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}. Put .init_array, .fini_array, etc. into the read-only data segment.
This commit is contained in:
parent
fb7c96323e
commit
dc4c9c199b
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-25 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
|
||||||
|
SymbianOS.
|
||||||
|
|
||||||
2005-01-25 Alexandre Oliva <aoliva@redhat.com>
|
2005-01-25 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
|
||||||
2004-12-10 Alexandre Oliva <aoliva@redhat.com>
|
2004-12-10 Alexandre Oliva <aoliva@redhat.com>
|
||||||
|
@ -5917,7 +5917,7 @@ elf32_arm_symbian_modify_segment_map (bfd *abfd,
|
|||||||
#undef elf_backend_may_use_rela_p
|
#undef elf_backend_may_use_rela_p
|
||||||
#define elf_backend_may_use_rela_p 0
|
#define elf_backend_may_use_rela_p 0
|
||||||
#undef elf_backend_default_use_rela_p
|
#undef elf_backend_default_use_rela_p
|
||||||
#define elf_backend_default_use_rela_p 1
|
#define elf_backend_default_use_rela_p 0
|
||||||
#undef elf_backend_rela_normal
|
#undef elf_backend_rela_normal
|
||||||
#define elf_backend_rela_normal 0
|
#define elf_backend_rela_normal 0
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2005-01-25 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* emulparams/armsymbian.sh (OTHER_READONLY_SECTIONS): Define, so
|
||||||
|
as to include .ARM.exidx$${Base,Limit}.
|
||||||
|
* ld/scripttempl/armbpabi.sc: Move .plt to end of text segment.
|
||||||
|
Define IMAGE$$ER_RO$${Base,Limit} and SHT$$INIT_ARRAY$${Base,Limit}.
|
||||||
|
Put .init_array, .fini_array, etc. into the read-only data
|
||||||
|
segment.
|
||||||
|
|
||||||
2005-01-25 Alan Modra <amodra@bigpond.net.au>
|
2005-01-25 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
|
* emultempl/elf32.em (gld${EMULATION_NAME}_try_needed): Formatting.
|
||||||
|
@ -9,6 +9,16 @@ TARGET2_TYPE=abs
|
|||||||
# On BPABI systems, program headers should not be mapped.
|
# On BPABI systems, program headers should not be mapped.
|
||||||
EMBEDDED=yes
|
EMBEDDED=yes
|
||||||
|
|
||||||
|
# As for armelf.sh, but add the SymbianOS-specific
|
||||||
|
# .ARM.exidx$${Base,Limit} symbols.
|
||||||
|
OTHER_READONLY_SECTIONS="
|
||||||
|
.ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }
|
||||||
|
${RELOCATING+ .ARM.exidx\$\$Base = . ; }
|
||||||
|
${RELOCATING+ __exidx_start = .; }
|
||||||
|
.ARM.exidx ${RELOCATING-0} : { *(.ARM.exidx${RELOCATING+* .gnu.linkonce.armexidx.*}) }
|
||||||
|
${RELOCATING+ __exidx_end = .; }
|
||||||
|
${RELOCATING+ .ARM.exidx\$\$Limit = . ; }"
|
||||||
|
|
||||||
# This value should match ELF_MAXPAGESIZE in BFD. Otherwise, elf.c
|
# This value should match ELF_MAXPAGESIZE in BFD. Otherwise, elf.c
|
||||||
# will not place read-write sections in a separate ELF segment from
|
# will not place read-write sections in a separate ELF segment from
|
||||||
# the read-only sections.
|
# the read-only sections.
|
||||||
|
@ -137,7 +137,10 @@ ${RELOCATING- /* For some reason, the Solaris linker makes bad executables
|
|||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
|
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR});}}}
|
||||||
|
/* SymbianOS uses this symbol. */
|
||||||
|
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Base = ${TEXT_START_ADDR});}}}
|
||||||
|
${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+ . = ${TEXT_BASE_ADDRESS};}}}
|
||||||
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
|
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
|
||||||
${CREATE_PIE+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
|
${CREATE_PIE+${RELOCATING+. = ${SHLIB_BASE_ADDRESS};}}
|
||||||
${INITIAL_READONLY_SECTIONS}
|
${INITIAL_READONLY_SECTIONS}
|
||||||
@ -150,8 +153,6 @@ cat <<EOF
|
|||||||
KEEP (*(.init))
|
KEEP (*(.init))
|
||||||
${RELOCATING+${INIT_END}}
|
${RELOCATING+${INIT_END}}
|
||||||
} =${NOP-0}
|
} =${NOP-0}
|
||||||
|
|
||||||
${DATA_PLT-${BSS_PLT-${PLT}}}
|
|
||||||
.text ${RELOCATING-0} :
|
.text ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
${RELOCATING+${TEXT_START_SYMBOLS}}
|
${RELOCATING+${TEXT_START_SYMBOLS}}
|
||||||
@ -167,13 +168,44 @@ cat <<EOF
|
|||||||
KEEP (*(.fini))
|
KEEP (*(.fini))
|
||||||
${RELOCATING+${FINI_END}}
|
${RELOCATING+${FINI_END}}
|
||||||
} =${NOP-0}
|
} =${NOP-0}
|
||||||
|
/* The SymbianOS kernel requires that the PLT go at the end of the
|
||||||
|
text section. */
|
||||||
|
${DATA_PLT-${BSS_PLT-${PLT}}}
|
||||||
${RELOCATING+PROVIDE (__etext = .);}
|
${RELOCATING+PROVIDE (__etext = .);}
|
||||||
${RELOCATING+PROVIDE (_etext = .);}
|
${RELOCATING+PROVIDE (_etext = .);}
|
||||||
${RELOCATING+PROVIDE (etext = .);}
|
${RELOCATING+PROVIDE (etext = .);}
|
||||||
|
/* SymbianOS uses this symbol. */
|
||||||
|
${RELOCATING+PROVIDE (Image\$\$ER_RO\$\$Limit = .);}
|
||||||
${WRITABLE_RODATA-${RODATA}}
|
${WRITABLE_RODATA-${RODATA}}
|
||||||
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
|
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
|
||||||
${CREATE_SHLIB-${SDATA2}}
|
${CREATE_SHLIB-${SDATA2}}
|
||||||
${CREATE_SHLIB-${SBSS2}}
|
${CREATE_SHLIB-${SBSS2}}
|
||||||
|
|
||||||
|
/* On SymbianOS, put .init_array and friends in the read-only
|
||||||
|
segment; there is no runtime relocation applied to these
|
||||||
|
arrays. */
|
||||||
|
|
||||||
|
/* Ensure the __preinit_array_start label is properly aligned. We
|
||||||
|
could instead move the label definition inside the section, but
|
||||||
|
the linker would then create the section even if it turns out to
|
||||||
|
be empty, which isn't pretty. */
|
||||||
|
${RELOCATING+. = ALIGN(${ALIGNMENT});}
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
|
||||||
|
.preinit_array ${RELOCATING-0} : { *(.preinit_array) }
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
|
||||||
|
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
|
||||||
|
/* SymbianOS uses this symbol. */
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (SHT\$\$INIT_ARRAY\$\$Base = .);}}
|
||||||
|
.init_array ${RELOCATING-0} : { *(.init_array) }
|
||||||
|
/* SymbianOS uses this symbol. */
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (SHT\$\$INIT_ARRAY\$\$Limit = .);}}
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
|
||||||
|
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
|
||||||
|
.fini_array ${RELOCATING-0} : { *(.fini_array) }
|
||||||
|
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
|
||||||
|
|
||||||
${OTHER_READONLY_SECTIONS}
|
${OTHER_READONLY_SECTIONS}
|
||||||
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
.eh_frame_hdr : { *(.eh_frame_hdr) }
|
||||||
.eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
.eh_frame ${RELOCATING-0} : ONLY_IF_RO { KEEP (*(.eh_frame)) }
|
||||||
@ -193,23 +225,6 @@ cat <<EOF
|
|||||||
.tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
|
.tdata ${RELOCATING-0} : { *(.tdata${RELOCATING+ .tdata.* .gnu.linkonce.td.*}) }
|
||||||
.tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
|
.tbss ${RELOCATING-0} : { *(.tbss${RELOCATING+ .tbss.* .gnu.linkonce.tb.*})${RELOCATING+ *(.tcommon)} }
|
||||||
|
|
||||||
/* Ensure the __preinit_array_start label is properly aligned. We
|
|
||||||
could instead move the label definition inside the section, but
|
|
||||||
the linker would then create the section even if it turns out to
|
|
||||||
be empty, which isn't pretty. */
|
|
||||||
${RELOCATING+. = ALIGN(${ALIGNMENT});}
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_start = .);}}
|
|
||||||
.preinit_array ${RELOCATING-0} : { *(.preinit_array) }
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__preinit_array_end = .);}}
|
|
||||||
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_start = .);}}
|
|
||||||
.init_array ${RELOCATING-0} : { *(.init_array) }
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__init_array_end = .);}}
|
|
||||||
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_start = .);}}
|
|
||||||
.fini_array ${RELOCATING-0} : { *(.fini_array) }
|
|
||||||
${RELOCATING+${CREATE_SHLIB-PROVIDE (__fini_array_end = .);}}
|
|
||||||
|
|
||||||
${RELOCATING+${CTOR}}
|
${RELOCATING+${CTOR}}
|
||||||
${RELOCATING+${DTOR}}
|
${RELOCATING+${DTOR}}
|
||||||
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
|
.jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
|
||||||
|
Loading…
Reference in New Issue
Block a user