From: Michael Meissner Date: Tue, 9 Dec 1997 20:37:00 +0000 (+0000) Subject: Add configurability to d30v X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0f764345d43956495b345d075830908e90555f6;p=binutils-gdb.git Add configurability to d30v --- diff --git a/ld/ChangeLog b/ld/ChangeLog index e0b83674d16..d7d13a09fea 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,25 @@ +start-sanitize-d30v +Tue Dec 9 15:28:17 1997 Michael Meissner + + * emulparams/d30velf.sh (STACK_START_ADDR): Top of default + stack. + ({TEXT,DATA,EMEM}_SIZE): Sizes of the 3 memory areas. + ({TEXT,DATA,BSS}_MEMORY): Which memory region .text, .data, and + .bss should go in. + + * scripttempl/elfd30v.sc: Allow .text, .data, .bss to be put in + either the onchip text/data areas or the external memory area. + (MEMORY): Get sizes from d30velf.sh. + (.e{data,text,bss}): Put sections in the external memory region. + (.stext): Put section in the onchip text region. + (.s{data,bss}): Put sections in the onchip data region. + (__stack): Assign from ${STACK_START_ADDR}. + (.text): Put in ${TEXT_MEMORY} memory region. + (.data{,1}/.strings/.rodata{,1}): Put in ${DATA_MEMORY} memory + region. + (.bss): Put in ${BSS_MEMORY} memory region. + +end-sanitize-d30v Tue Dec 2 10:14:47 1997 Nick Clifton * configure.tgt (targ_extra_emuls): Add support for Thumb target. diff --git a/ld/scripttempl/elfd30v.sc b/ld/scripttempl/elfd30v.sc new file mode 100644 index 00000000000..ad76a995d5c --- /dev/null +++ b/ld/scripttempl/elfd30v.sc @@ -0,0 +1,150 @@ +cat < text} + + /* External memory */ + .etext ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__etext_start = .) ; } + *(.etext) + ${RELOCATING+ PROVIDE (__etext_end = .) ; } + } ${RELOCATING+ > emem} + + /* Internal text space or external memory */ + .text : + { + ${RELOCATING+ PROVIDE (__text_start = .) ; } + *(.text) + *(.gnu.linkonce.t*) + *(.init) + *(.fini) + ${RELOCATING+ PROVIDE (__text_end = .) ; } + ${RELOCATING+ _etext = . ; } + } ${RELOCATING+ > ${TEXT_MEMORY}} + + /* Internal data space */ + .sdata ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__sdata_start = .) ; } + *(.sdata) + ${RELOCATING+ PROVIDE (__sdata_end = .) ; } + } ${RELOCATING+ > data} + + /* External memory */ + .edata ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__edata_start = .) ; } + *(.edata) + ${RELOCATING+ PROVIDE (__edata_end = .) ; } + } ${RELOCATING+ > emem} + + /* Internal data space or external memory */ + .strings ${RELOCATING-0} : { *(.strings) } ${RELOCATING+ > ${DATA_MEMORY}} + .rodata ${RELOCATING-0} : { *(.rodata) } ${RELOCATING+ > ${DATA_MEMORY}} + .rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+ > ${DATA_MEMORY}} + .data1 ${RELOCATING-0} : { *(.data1) } ${RELOCATING+ > ${DATA_MEMORY}} + + .ctors ${RELOCATING-0} : + { + ${CONSTRUCTING+${CTOR_START}} + *(.ctors) + ${CONSTRUCTING+${CTOR_END}} + } ${RELOCATING+ > ${DATA_MEMORY}} + + .dtors ${RELOCATING-0} : + { + ${CONSTRUCTING+${DTOR_START}} + *(.dtors) + ${CONSTRUCTING+${DTOR_END}} + } ${RELOCATING+ > ${DATA_MEMORY}} + + .data ${RELOCATING-0} : + { + *(.data) + *(.gnu.linkonce.d*) + ${CONSTRUCTING+CONSTRUCTORS} + ${RELOCATING+ _edata = . ; } + } ${RELOCATING+ > ${DATA_MEMORY}} + + .sbss ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__sbss_start = .) ; } + *(.sbss) + ${RELOCATING+ PROVIDE (__sbss_end = .) ; } + } ${RELOCATING+ > data} + + .ebss ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__ebss_start = .) ; } + *(.ebss) + ${RELOCATING+ PROVIDE (__ebss_end = .) ; } + } ${RELOCATING+ > data} + + .bss ${RELOCATING-0} : + { + ${RELOCATING+ PROVIDE (__bss_start = .) ; } + *(.bss) + *(COMMON) + ${RELOCATING+ PROVIDE (__bss_end = .) ; } + ${RELOCATING+ _end = . ; } + } ${RELOCATING+ > ${DATA_MEMORY}} + + /* Stabs debugging sections. */ + .stab 0 : { *(.stab) } + .stabstr 0 : { *(.stabstr) } + .stab.excl 0 : { *(.stab.excl) } + .stab.exclstr 0 : { *(.stab.exclstr) } + .stab.index 0 : { *(.stab.index) } + .stab.indexstr 0 : { *(.stab.indexstr) } + + .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) } + .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) } + + PROVIDE (__stack = ${STACK_START_ADDR}); +} +EOF + + + +