/* Sun Jan 14 14:11:22 2001 ackley@cs.unm.edu

   A (GNU) ld script for linking the isem_rom image
   from isem_rom.o and isem_vec.o, customized from
   the GNU ld 2.10.1 default (sun4) script.

   Goals:
   (1) Require that the .text section of isem_vec be page-aligned
   (2) Do not require that the .text section of isem_rom be page-aligned
   (3) Start linking at 0x2020 not something weird like 0x20
   (4) Set the entry point to the symbol 'start' (as long as we're
       doing a customized ld script anyway, might as well absorb 
       excess command line arguments).

    Lines not marked with 'isem' below are from the 
    default ld script generated by 'isem_ld --verbose'
 */

OUTPUT_FORMAT("a.out-sunos-big", "a.out-sunos-big",
	      "a.out-sunos-big")
OUTPUT_ARCH(sparc)
 SEARCH_DIR(/usr/local/sun4/lib);
PROVIDE (__stack = 0);
SECTIONS
{
  ENTRY(start)         /* isem (4) Set the entry point */
  . = 0x2020;          /*      (3) Set the link start */
  .text :
  {
    CREATE_OBJECT_SYMBOLS
    isem_rom.o(.text)  /* isem (2) Suck in isem_rom's .text */
    . = ALIGN(0x1000); /* isem (1) Bump up to a 4Kb page boundary */
    isem_vec.o(.text)  /*          and suck in isem_vec's .text */
    *(.text)
    /* The next six sections are for SunOS dynamic linking.  The order
       is important.  */
    *(.dynrel)
    *(.hash)
    *(.dynsym)
    *(.dynstr)
    *(.rules)
    *(.need)
    _etext = .;
    __etext = .;
  }
  . = ALIGN(0x2000);
  .data :
  {
    /* The first three sections are for SunOS dynamic linking.  */
    *(.dynamic)
    *(.got)
    *(.plt)
    *(.data)
    *(.linux-dynamic) /* For Linux dynamic linking.  */
    CONSTRUCTORS
    _edata  =  .;
    __edata  =  .;
  }
  .bss :
  {
    __bss_start = .;
   *(.bss)
   *(COMMON)
   . = ALIGN(8);
   _end = . ;
   __end = . ;
  }
}

