OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [ld/] [scripttempl/] [tic4xcoff.sc] - Diff between revs 156 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 156 Rev 816
# In microcomputer (MC) mode, the vectors are mapped into the on-chip ROM,
# In microcomputer (MC) mode, the vectors are mapped into the on-chip ROM,
# otherwise in microprocessor (MP) mode the vectors are mapped to address 0
# otherwise in microprocessor (MP) mode the vectors are mapped to address 0
# on the external bus.  In MC mode, the on-chip ROM contains a bootloader program
# on the external bus.  In MC mode, the on-chip ROM contains a bootloader program
# that loads the internal RAM from the serial port or external ROM.
# that loads the internal RAM from the serial port or external ROM.
#
#
# Common configurations:
# Common configurations:
# 1. MC mode, no external memory (serial boot).
# 1. MC mode, no external memory (serial boot).
# 2. MC mode, external RAM (serial boot).
# 2. MC mode, external RAM (serial boot).
# 3. MC mode, external ROM.
# 3. MC mode, external ROM.
# 4. MC mode, external ROM, external RAM.
# 4. MC mode, external ROM, external RAM.
# 5. MP mode, external ROM.
# 5. MP mode, external ROM.
# 6. MP mode, external ROM, external RAM.
# 6. MP mode, external ROM, external RAM.
# 7. MP mode, external RAM (dual-port with hosting CPU or external debugger).
# 7. MP mode, external RAM (dual-port with hosting CPU or external debugger).
#
#
# Config  TEXT     DATA/BSS
# Config  TEXT     DATA/BSS
# 1.      INT_RAM  INT_RAM   (mcmode,onchip)
# 1.      INT_RAM  INT_RAM   (mcmode,onchip)
# 2.      EXT_RAM  EXT_RAM   (mcmode,extram)
# 2.      EXT_RAM  EXT_RAM   (mcmode,extram)
# 3.      INT_RAM  INT_RAM   (mcmode,onchip)
# 3.      INT_RAM  INT_RAM   (mcmode,onchip)
# 4.      EXT_RAM  EXT_RAM   (mcmode,extram)
# 4.      EXT_RAM  EXT_RAM   (mcmode,extram)
# 5.      EXT_ROM  INT_RAM   (mpmode,onchip,extrom)
# 5.      EXT_ROM  INT_RAM   (mpmode,onchip,extrom)
# 6.      EXT_ROM  EXT_RAM   (mpmode,extram,extrom)
# 6.      EXT_ROM  EXT_RAM   (mpmode,extram,extrom)
# 7.      EXT_RAM  EXT_RAM   (mpmode,extram)
# 7.      EXT_RAM  EXT_RAM   (mpmode,extram)
#
#
# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
# In MC mode, TEXT and DATA are copied into RAM by the bootloader.
#
#
# In MP mode with external ROM, DATA needs to be copied into RAM at boot time.
# In MP mode with external ROM, DATA needs to be copied into RAM at boot time.
#
#
# If there is external RAM it is better to use that and reserve the internal RAM
# If there is external RAM it is better to use that and reserve the internal RAM
# for data buffers.  However, the address of the external RAM needs to be specified.
# for data buffers.  However, the address of the external RAM needs to be specified.
#
#
# This emulation assumes config 7.
# This emulation assumes config 7.
case $OUTPUT_ARCH in
case $OUTPUT_ARCH in
  tic3x) OUTPUT_ARCHNAME="TMS320C3x" ;;
  tic3x) OUTPUT_ARCHNAME="TMS320C3x" ;;
  tic4x) OUTPUT_ARCHNAME="TMS320C4x" ;;
  tic4x) OUTPUT_ARCHNAME="TMS320C4x" ;;
esac
esac
case $ONCHIP in
case $ONCHIP in
  yes) RAM=RAM;
  yes) RAM=RAM;
       STACK_SIZE_DEFAULT=128;
       STACK_SIZE_DEFAULT=128;
       HEAP_SIZE_DEFAULT=0;
       HEAP_SIZE_DEFAULT=0;
       ;;
       ;;
  *)   RAM=EXT0;
  *)   RAM=EXT0;
       STACK_SIZE_DEFAULT=0x1000;
       STACK_SIZE_DEFAULT=0x1000;
       HEAP_SIZE_DEFAULT=0x4000;
       HEAP_SIZE_DEFAULT=0x4000;
       ;;
       ;;
esac
esac
TEXT_MEMORY=$RAM;
TEXT_MEMORY=$RAM;
DATA_MEMORY=$RAM;
DATA_MEMORY=$RAM;
MEMORY_DEF="
MEMORY_DEF="
/* C30 memory space.  */
/* C30 memory space.  */
MEMORY
MEMORY
{
{
   EXT0  :  org = 0x0000000, len = 0x800000  /* External address bus.  */
   EXT0  :  org = 0x0000000, len = 0x800000  /* External address bus.  */
   XBUS  :  org = 0x0800000, len = 0x002000  /* Expansion bus.         */
   XBUS  :  org = 0x0800000, len = 0x002000  /* Expansion bus.         */
   IOBUS :  org = 0x0804000, len = 0x002000  /* I/O BUS.               */
   IOBUS :  org = 0x0804000, len = 0x002000  /* I/O BUS.               */
   RAM0  :  org = 0x0809800, len = 0x000400  /* Internal RAM block 0.  */
   RAM0  :  org = 0x0809800, len = 0x000400  /* Internal RAM block 0.  */
   RAM1  :  org = 0x0809a00, len = 0x000400  /* Internal RAM block 1.  */
   RAM1  :  org = 0x0809a00, len = 0x000400  /* Internal RAM block 1.  */
   RAM   :  org = 0x0809800, len = 0x000800  /* Internal RAM.          */
   RAM   :  org = 0x0809800, len = 0x000800  /* Internal RAM.          */
   EXT1  :  org = 0x080a000, len = 0x7f6000  /* External address bus.  */
   EXT1  :  org = 0x080a000, len = 0x7f6000  /* External address bus.  */
}
}
"
"
test -z "$ENTRY" && ENTRY=_start
test -z "$ENTRY" && ENTRY=_start
cat <
cat <
${RELOCATING+/* Linker script for $OUTPUT_ARCHNAME executable.  */}
${RELOCATING+/* Linker script for $OUTPUT_ARCHNAME executable.  */}
${RELOCATING-/* Linker script for $OUTPUT_ARCHNAME object file (ld -r).  */}
${RELOCATING-/* Linker script for $OUTPUT_ARCHNAME object file (ld -r).  */}
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH("${OUTPUT_ARCH}")
OUTPUT_ARCH("${OUTPUT_ARCH}")
${LIB_SEARCH_DIRS}
${LIB_SEARCH_DIRS}
ENTRY(${ENTRY})
ENTRY(${ENTRY})
${RELOCATING+ __HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : ${HEAP_SIZE_DEFAULT};}
${RELOCATING+ __HEAP_SIZE = DEFINED(__HEAP_SIZE) ? __HEAP_SIZE : ${HEAP_SIZE_DEFAULT};}
${RELOCATING+ __STACK_SIZE  = DEFINED(__STACK_SIZE)  ? __STACK_SIZE  : ${STACK_SIZE_DEFAULT};}
${RELOCATING+ __STACK_SIZE  = DEFINED(__STACK_SIZE)  ? __STACK_SIZE  : ${STACK_SIZE_DEFAULT};}
${RELOCATING+${MEMORY_DEF}}
${RELOCATING+${MEMORY_DEF}}
/* In the small memory model the .data and .bss sections must be contiguous
/* In the small memory model the .data and .bss sections must be contiguous
   when loaded and fit within the same page.   The DP register is loaded
   when loaded and fit within the same page.   The DP register is loaded
   with the page address.  */
   with the page address.  */
SECTIONS
SECTIONS
{
{
  /* Reset, interrupt, and trap vectors.  */
  /* Reset, interrupt, and trap vectors.  */
  .vectors ${RELOCATING+ 0} : {
  .vectors ${RELOCATING+ 0} : {
    *(.vectors)
    *(.vectors)
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  /* Constants.  */
  /* Constants.  */
  .const : {
  .const : {
    *(.const)
    *(.const)
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  /* Program code.  */
  /* Program code.  */
  .text : {
  .text : {
    ${RELOCATING+  __text =  .;}
    ${RELOCATING+  __text =  .;}
    ${RELOCATING+ *(.init)}
    ${RELOCATING+ *(.init)}
    *(.text)
    *(.text)
    ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
    ${CONSTRUCTING+ ___CTOR_LIST__ = .;}
    ${CONSTRUCTING+ LONG(___CTOR_END__ - ___CTOR_LIST__ - 2)}
    ${CONSTRUCTING+ LONG(___CTOR_END__ - ___CTOR_LIST__ - 2)}
    ${CONSTRUCTING+ *(.ctors)}
    ${CONSTRUCTING+ *(.ctors)}
    ${CONSTRUCTING+ LONG(0);}
    ${CONSTRUCTING+ LONG(0);}
    ${CONSTRUCTING+ ___CTOR_END__  = .;}
    ${CONSTRUCTING+ ___CTOR_END__  = .;}
    ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
    ${CONSTRUCTING+ ___DTOR_LIST__ = .;}
    ${CONSTRUCTING+ LONG(___DTOR_END__ - ___DTOR_LIST__ - 2)}
    ${CONSTRUCTING+ LONG(___DTOR_END__ - ___DTOR_LIST__ - 2)}
    ${CONSTRUCTING+ *(.dtors)}
    ${CONSTRUCTING+ *(.dtors)}
    ${CONSTRUCTING+ LONG(0)}
    ${CONSTRUCTING+ LONG(0)}
    ${CONSTRUCTING+ ___DTOR_END__  = .;}
    ${CONSTRUCTING+ ___DTOR_END__  = .;}
    ${RELOCATING+ *(.fini)}
    ${RELOCATING+ *(.fini)}
    ${RELOCATING+  __etext =  .;}
    ${RELOCATING+  __etext =  .;}
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  } ${RELOCATING+ > ${TEXT_MEMORY}}
  /* Global initialised variables.  */
  /* Global initialised variables.  */
  .data :
  .data :
  {
  {
    ${RELOCATING+  __data  =  .;}
    ${RELOCATING+  __data  =  .;}
    *(.data)
    *(.data)
    ${RELOCATING+  __edata  = .;}
    ${RELOCATING+  __edata  = .;}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  /* Global uninitialised variables.  */
  /* Global uninitialised variables.  */
  .bss : {
  .bss : {
    ${RELOCATING+ __bss  =  .;}
    ${RELOCATING+ __bss  =  .;}
    *(.bss)
    *(.bss)
    *(COMMON)
    *(COMMON)
    ${RELOCATING+  __end  =  .;}
    ${RELOCATING+  __end  =  .;}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  /* Heap.  */
  /* Heap.  */
  .heap :
  .heap :
  {
  {
    ${RELOCATING+ __heap  =  .;}
    ${RELOCATING+ __heap  =  .;}
    ${RELOCATING+ . += __HEAP_SIZE};
    ${RELOCATING+ . += __HEAP_SIZE};
  } ${RELOCATING+ > ${DATA_MEMORY}}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  /* Stack (grows upward).  */
  /* Stack (grows upward).  */
  .stack :
  .stack :
  {
  {
    ${RELOCATING+ __stack  =  .;}
    ${RELOCATING+ __stack  =  .;}
    *(.stack)
    *(.stack)
    ${RELOCATING+ .  =  . + __STACK_SIZE};
    ${RELOCATING+ .  =  . + __STACK_SIZE};
  } ${RELOCATING+ > ${DATA_MEMORY}}
  } ${RELOCATING+ > ${DATA_MEMORY}}
  .stab 0 ${RELOCATING+(NOLOAD)} :
  .stab 0 ${RELOCATING+(NOLOAD)} :
  {
  {
    [ .stab ]
    [ .stab ]
  }
  }
  .stabstr 0 ${RELOCATING+(NOLOAD)} :
  .stabstr 0 ${RELOCATING+(NOLOAD)} :
  {
  {
    [ .stabstr ]
    [ .stabstr ]
  }
  }
}
}
EOF
EOF
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.