mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
[ARC][committed] Use DWARF.sc in elf linker script templates.
xxxx-xx-xx Claudiu Zissulescu <claziss@synopsys.com> * elfarcv2.sc : Allow interrupt vector table to be located at an arbitrary address. Use DWARF.sc file. * elfarc.sc: Use DWARF.sc file.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2020-01-13 Claudiu Zissulescu <claziss@gmail.com>
|
||||||
|
|
||||||
|
* scripttempl/elfarcv2.sc : Allow interrupt vector table to be
|
||||||
|
located at an arbitrary address. Use DWARF.sc file.
|
||||||
|
* scripttempl/elfarc.sc: Use DWARF.sc file.
|
||||||
|
|
||||||
2020-01-07 Alan Modra <amodra@gmail.com>
|
2020-01-07 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* testsuite/ld-mips-elf/eh-frame5.s,
|
* testsuite/ld-mips-elf/eh-frame5.s,
|
||||||
|
@ -408,40 +408,14 @@ cat <<EOF
|
|||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
|
||||||
.comment 0 : { *(.comment) }
|
.comment 0 : { *(.comment) }
|
||||||
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||||
|
EOF
|
||||||
|
|
||||||
/* DWARF debug sections.
|
. $srcdir/scripttempl/DWARF.sc
|
||||||
Symbols in the DWARF debugging sections are relative to the beginning
|
|
||||||
of the section so we begin them at 0. */
|
|
||||||
|
|
||||||
/* DWARF 1 */
|
|
||||||
.debug 0 : { *(.debug) }
|
|
||||||
.line 0 : { *(.line) }
|
|
||||||
|
|
||||||
/* GNU DWARF 1 extensions */
|
|
||||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
||||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
||||||
|
|
||||||
/* DWARF 1.1 and DWARF 2 */
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
|
|
||||||
/* DWARF 2 */
|
|
||||||
.debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_frame 0 : { *(.debug_frame) }
|
|
||||||
.debug_str 0 : { *(.debug_str) }
|
|
||||||
.debug_loc 0 : { *(.debug_loc) }
|
|
||||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
||||||
|
|
||||||
/* SGI/MIPS DWARF 2 extensions */
|
|
||||||
.debug_weaknames 0 : { *(.debug_weaknames) }
|
|
||||||
.debug_funcnames 0 : { *(.debug_funcnames) }
|
|
||||||
.debug_typenames 0 : { *(.debug_typenames) }
|
|
||||||
.debug_varnames 0 : { *(.debug_varnames) }
|
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
/* ARC Extension Sections */
|
/* ARC Extension Sections */
|
||||||
.arcextmap 0 : { *(.gnu.linkonce.arcextmap.*) }
|
.arcextmap 0 : { *(.arcextmap.*) }
|
||||||
|
|
||||||
${OTHER_SECTIONS}
|
${OTHER_SECTIONS}
|
||||||
${RELOCATING+${OTHER_END_SYMBOLS}}
|
${RELOCATING+${OTHER_END_SYMBOLS}}
|
||||||
|
@ -54,6 +54,16 @@ DTOR=".dtors ${CONSTRUCTING-0} :
|
|||||||
${CONSTRUCTING+${DTOR_END}}
|
${CONSTRUCTING+${DTOR_END}}
|
||||||
} ${RELOCATING+ > ${DATA_MEMORY}}"
|
} ${RELOCATING+ > ${DATA_MEMORY}}"
|
||||||
|
|
||||||
|
IVT="
|
||||||
|
/* If the 'ivtbase_addr' symbol is defined, it indicates the base address of
|
||||||
|
the interrupt vectors. See description of INT_VECTOR_BASE register. */
|
||||||
|
|
||||||
|
.ivt DEFINED (ivtbase_addr) ? ivtbase_addr : 0x00 :
|
||||||
|
{
|
||||||
|
${RELOCATING+ PROVIDE (__ivtbase_addr = .); }
|
||||||
|
KEEP (*(.ivt));
|
||||||
|
} ${RELOCATING+ > ${STARTUP_MEMORY}}"
|
||||||
|
|
||||||
if test -z "${NO_SMALL_DATA}"; then
|
if test -z "${NO_SMALL_DATA}"; then
|
||||||
SBSS=".sbss ${RELOCATING-0} :
|
SBSS=".sbss ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
@ -110,10 +120,6 @@ MEMORY
|
|||||||
ICCM : ORIGIN = 0x00000000, LENGTH = ${ICCM_SIZE}
|
ICCM : ORIGIN = 0x00000000, LENGTH = ${ICCM_SIZE}
|
||||||
DCCM : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
|
DCCM : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Setup the stack on the top of the data memory bank. */
|
|
||||||
PROVIDE (__stack_top = (${RAM_START_ADDR} + ${RAM_SIZE} - 1) & -4);
|
|
||||||
PROVIDE (__end_heap = ${RAM_START_ADDR} + ${RAM_SIZE} - 1);
|
|
||||||
"
|
"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@ -129,15 +135,7 @@ ${RELOCATING+${MEMORY_DEF}}
|
|||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
.ivt 0x00 :
|
${RELOCATING+${IVT}}
|
||||||
{
|
|
||||||
KEEP (*(.ivt));
|
|
||||||
} ${RELOCATING+ > ${STARTUP_MEMORY}}
|
|
||||||
|
|
||||||
.startup 0x100:
|
|
||||||
{
|
|
||||||
KEEP (*crt0.o(.text.__startup))
|
|
||||||
} ${RELOCATING+ > ${STARTUP_MEMORY}}
|
|
||||||
|
|
||||||
/* Read-only sections, merged into text segment: */
|
/* Read-only sections, merged into text segment: */
|
||||||
${TEXT_DYNAMIC+${DYNAMIC}}
|
${TEXT_DYNAMIC+${DYNAMIC}}
|
||||||
@ -175,35 +173,21 @@ SECTIONS
|
|||||||
.rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
|
.rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
|
||||||
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
|
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
|
||||||
|
|
||||||
.jcr : { KEEP (*(.jcr)) } ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
.eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
.gcc_except_table : { *(.gcc_except_table${RELOCATING+ .gcc_except_table.*}) } ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
.plt : { *(.plt) } ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
.jlitab :
|
|
||||||
{
|
|
||||||
${RELOCATING+${JLI_START_TABLE}}
|
|
||||||
${RELOCATING+jlitab*.o:(.jlitab*)}
|
|
||||||
*(.jlitab${RELOCATING+*})
|
|
||||||
} ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
|
|
||||||
.rodata ${RELOCATING-0} :
|
|
||||||
{
|
|
||||||
*(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)}
|
|
||||||
} ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
|
|
||||||
.rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+> ${TEXT_MEMORY}}
|
|
||||||
|
|
||||||
.init ${RELOCATING-0} :
|
|
||||||
{
|
|
||||||
${RELOCATING+${INIT_START}}
|
|
||||||
KEEP (*(SORT_NONE(.init)))
|
|
||||||
${RELOCATING+${INIT_END}}
|
|
||||||
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
|
|
||||||
|
|
||||||
.text ${RELOCATING-0} :
|
.text ${RELOCATING-0} :
|
||||||
{
|
{
|
||||||
${RELOCATING+${TEXT_START_SYMBOLS}}
|
${RELOCATING+${TEXT_START_SYMBOLS}}
|
||||||
|
|
||||||
|
${RELOCATING+ . = ALIGN(4);}
|
||||||
|
${RELOCATING+${INIT_START}}
|
||||||
|
KEEP (*(SORT_NONE(.init)))
|
||||||
|
${RELOCATING+${INIT_END}}
|
||||||
|
|
||||||
|
/* Start here after reset. */
|
||||||
|
${RELOCATING+ . = ALIGN(4);}
|
||||||
|
KEEP (*crt0.o(.text.__startup))
|
||||||
|
|
||||||
|
/* Remaining code. */
|
||||||
|
${RELOCATING+ . = ALIGN(4);}
|
||||||
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
|
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
|
||||||
/* .gnu.warning sections are handled specially by elf.em. */
|
/* .gnu.warning sections are handled specially by elf.em. */
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
@ -223,6 +207,39 @@ SECTIONS
|
|||||||
${RELOCATING+PROVIDE (etext = .);}
|
${RELOCATING+PROVIDE (etext = .);}
|
||||||
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
|
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
|
||||||
|
|
||||||
|
.jcr ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
KEEP (*(.jcr))
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.eh_frame ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
KEEP (*(.eh_frame))
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.gcc_except_table ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
*(.gcc_except_table) *(.gcc_except_table.*)
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.plt ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
*(.plt)
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.jlitab ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
${RELOCATING+${JLI_START_TABLE}}
|
||||||
|
jlitab*.o:(.jlitab*) *(.jlitab*)
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.rodata ${RELOCATING-0} :
|
||||||
|
{
|
||||||
|
*(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)}
|
||||||
|
} ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
|
.rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+> ${TEXT_MEMORY}}
|
||||||
|
|
||||||
${RELOCATING+${OTHER_READONLY_SECTIONS}}
|
${RELOCATING+${OTHER_READONLY_SECTIONS}}
|
||||||
|
|
||||||
/* Start of the data section image in ROM. */
|
/* Start of the data section image in ROM. */
|
||||||
@ -271,6 +288,8 @@ SECTIONS
|
|||||||
${RELOCATING+ PROVIDE (__start_heap = .) ; }
|
${RELOCATING+ PROVIDE (__start_heap = .) ; }
|
||||||
} ${RELOCATING+ > ${DATA_MEMORY}}
|
} ${RELOCATING+ > ${DATA_MEMORY}}
|
||||||
|
|
||||||
|
${RELOCATING+ PROVIDE (__stack_top = (ORIGIN (${DATA_MEMORY}) + LENGTH (${DATA_MEMORY}) - 1) & -4);}
|
||||||
|
${RELOCATING+ PROVIDE (__end_heap = ORIGIN (${DATA_MEMORY}) + LENGTH (${DATA_MEMORY}) - 1);}
|
||||||
|
|
||||||
/* Stabs debugging sections. */
|
/* Stabs debugging sections. */
|
||||||
.stab 0 : { *(.stab) }
|
.stab 0 : { *(.stab) }
|
||||||
@ -281,40 +300,13 @@ SECTIONS
|
|||||||
.stab.indexstr 0 : { *(.stab.indexstr) }
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
|
||||||
.comment 0 : { *(.comment) }
|
.comment 0 : { *(.comment) }
|
||||||
|
.note.gnu.build-id : { *(.note.gnu.build-id) }
|
||||||
|
EOF
|
||||||
|
|
||||||
/* DWARF debug sections.
|
. $srcdir/scripttempl/DWARF.sc
|
||||||
Symbols in the DWARF debugging sections are relative to the beginning
|
|
||||||
of the section so we begin them at 0. */
|
|
||||||
|
|
||||||
/* DWARF 1 */
|
|
||||||
.debug 0 : { *(.debug) }
|
|
||||||
.line 0 : { *(.line) }
|
|
||||||
|
|
||||||
/* GNU DWARF 1 extensions */
|
|
||||||
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
|
||||||
.debug_sfnames 0 : { *(.debug_sfnames) }
|
|
||||||
|
|
||||||
/* DWARF 1.1 and DWARF 2 */
|
|
||||||
.debug_aranges 0 : { *(.debug_aranges) }
|
|
||||||
.debug_pubnames 0 : { *(.debug_pubnames) }
|
|
||||||
|
|
||||||
/* DWARF 2 */
|
|
||||||
.debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
|
|
||||||
.debug_abbrev 0 : { *(.debug_abbrev) }
|
|
||||||
.debug_line 0 : { *(.debug_line) }
|
|
||||||
.debug_frame 0 : { *(.debug_frame) }
|
|
||||||
.debug_str 0 : { *(.debug_str) }
|
|
||||||
.debug_loc 0 : { *(.debug_loc) }
|
|
||||||
.debug_macinfo 0 : { *(.debug_macinfo) }
|
|
||||||
|
|
||||||
/* DWARF 3 */
|
|
||||||
.debug_pubtypes 0 : { *(.debug_pubtypes) }
|
|
||||||
.debug_ranges 0 : { *(.debug_ranges) }
|
|
||||||
|
|
||||||
/* DWARF Extension. */
|
|
||||||
.debug_macro 0 : { *(.debug_macro) }
|
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
/* ARC Extension Sections */
|
/* ARC Extension Sections */
|
||||||
.arcextmap 0 : { *(.gnu.linkonce.arcextmap.*) }
|
.arcextmap 0 : { *(.arcextmap.*) }
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
Reference in New Issue
Block a user