X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Fscripttempl%2Fxstormy16.sc;h=b89560873b3a9cb464746c14ea784712987ff21c;hb=30ce8e47fad9b057b6d7af9e1d43061126d34d20;hp=183cc6734df7faaee71c8a4a7aae09c2158af5c0;hpb=df381c72f46873ac16530442ac11b160009bcba8;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/scripttempl/xstormy16.sc b/ld/scripttempl/xstormy16.sc index 183cc6734d..b89560873b 100644 --- a/ld/scripttempl/xstormy16.sc +++ b/ld/scripttempl/xstormy16.sc @@ -1,3 +1,8 @@ +# Copyright (C) 2014-2020 Free Software Foundation, Inc. +# +# Copying and distribution of this file, with or without modification, +# are permitted in any medium without royalty provided the copyright +# notice and this notice are preserved. # # Unusual variables checked by this code: # NOP - two byte opcode for no-op (defaults to 0) @@ -20,9 +25,9 @@ # .bss section besides __bss_start. # INPUT_FILES - INPUT command of files to always include # INIT_START, INIT_END - statements just before and just after -# combination of .init sections. +# combination of .init sections. # FINI_START, FINI_END - statements just before and just after -# combination of .fini sections. +# combination of .fini sections. # # When adding sections, do note that the names of some sections are used # when specifying the start address of the next. @@ -54,7 +59,7 @@ test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT} if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" -CTOR=".ctors : +CTOR=".ctors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${CTOR_START}} /* gcc uses crtbegin.o to find the start of @@ -81,7 +86,7 @@ CTOR=".ctors : ${CONSTRUCTING+${CTOR_END}} } > ROM" -DTOR=" .dtors : +DTOR=" .dtors ${CONSTRUCTING-0} : { ${CONSTRUCTING+${DTOR_START}} KEEP (*crtbegin.o(.dtors)) @@ -93,26 +98,37 @@ DTOR=" .dtors : } > ROM" cat < RAM + }${RELOCATING+ > RAM} ${RELOCATING+${OTHER_READWRITE_SECTIONS}} ${RELOCATING+${OTHER_GOT_SYMBOLS}} ${RELOCATING+${OTHER_GOT_SECTIONS}} @@ -129,18 +145,18 @@ SECTIONS ${RELOCATING+PROVIDE (edata = .);} ${RELOCATING+__bss_start = .;} ${RELOCATING+${OTHER_BSS_SYMBOLS}} - .bss : + .bss ${RELOCATING-0} : { - *(.dynbss) + ${RELOCATING+*(.dynbss)} *(.bss) ${RELOCATING+*(.bss.*)} ${RELOCATING+*(.gnu.linkonce.b.*)} - *(COMMON) + ${RELOCATING+*(COMMON) /* Align here to ensure that the .bss section occupies space up to _end. Align after .bss to ensure correct alignment even if the .bss section disappears because there are no input sections. */ - ${RELOCATING+. = ALIGN(${ALIGNMENT});} - } > RAM + . = ALIGN(${ALIGNMENT});} + }${RELOCATING+ > RAM} ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+. = ALIGN(${ALIGNMENT});} ${RELOCATING+${OTHER_END_SYMBOLS}} @@ -149,39 +165,39 @@ SECTIONS ${RELOCATING+PROVIDE (end = .);} /* Read-only sections in ROM. */ - .int_vec : { *(.int_vec) } ${RELOCATING+> ROM} + .int_vec ${RELOCATING-0} : { *(.int_vec) }${RELOCATING+ > ROM} - .rodata : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} } ${RELOCATING+> ROM} + .rodata ${RELOCATING-0} : { *(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)} }${RELOCATING+ > ROM} ${RELOCATING+${CTOR}} ${RELOCATING+${DTOR}} - .jcr : { KEEP (*(.jcr)) } ${RELOCATING+> ROM} - .eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+> ROM} - .gcc_except_table : { *(.gcc_except_table) } ${RELOCATING+> ROM} - .plt : { *(.plt) } ${RELOCATING+> ROM} + .jcr : { KEEP (*(.jcr)) }${RELOCATING+ > ROM} + .eh_frame : { KEEP (*(.eh_frame)) }${RELOCATING+ > ROM} + .gcc_except_table : { *(.gcc_except_table)${RELOCATING+ *(.gcc_except_table.*)} }${RELOCATING+ > ROM} + .plt : { *(.plt) }${RELOCATING+ > ROM} - .text : + .text ${RELOCATING-0} : { ${RELOCATING+${TEXT_START_SYMBOLS}} *(.text) ${RELOCATING+*(.text.*)} *(.stub) - /* .gnu.warning sections are handled specially by elf32.em. */ + /* .gnu.warning sections are handled specially by elf.em. */ *(.gnu.warning) ${RELOCATING+*(.gnu.linkonce.t.*)} ${RELOCATING+${OTHER_TEXT_SECTIONS}} - } ${RELOCATING+> ROM =${NOP-0}} - .init : - { + }${RELOCATING+ > ROM =${NOP-0}} + .init ${RELOCATING-0} : + { ${RELOCATING+${INIT_START}} - KEEP (*(.init)) + KEEP (*(SORT_NONE(.init))) ${RELOCATING+${INIT_END}} - } ${RELOCATING+> ROM =${NOP-0}} - .fini : + }${RELOCATING+ > ROM =${NOP-0}} + .fini ${RELOCATING-0} : { ${RELOCATING+${FINI_START}} - KEEP (*(.fini)) + KEEP (*(SORT_NONE(.fini))) ${RELOCATING+${FINI_END}} - } ${RELOCATING+> ROM =${NOP-0}} + }${RELOCATING+ > ROM =${NOP-0}} ${RELOCATING+PROVIDE (__etext = .);} ${RELOCATING+PROVIDE (_etext = .);} ${RELOCATING+PROVIDE (etext = .);} @@ -198,37 +214,11 @@ SECTIONS .comment 0 : { *(.comment) } - /* DWARF debug sections. - 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) *(.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) } +EOF +. $srcdir/scripttempl/DWARF.sc + +cat <