home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / src / binutils.2 / ld / mips.sc- < prev    next >
Encoding:
Text File  |  1993-05-30  |  1.1 KB  |  54 lines

  1. # Linker script for MIPS systems.
  2. # Ian Lance Taylor <ian@cygnus.com>.
  3. # These variables may be overridden by the emulation file.  The
  4. # defaults are appropriate for a DECstation running Ultrix.
  5. test -z "$ENTRY" && ENTRY=__start
  6. test -z "$TEXT_START_ADDR" && TEXT_START_ADDR="0x400000 + SIZEOF_HEADERS"
  7. test -z "$DATA_ADDR" && DATA_ADDR=0x10000000
  8. test -z "$BSS_VAR" && BSS_VAR=
  9. cat <<EOF
  10. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  11. ${LIB_SEARCH_DIRS}
  12.  
  13. ENTRY(${ENTRY})
  14.  
  15. SECTIONS
  16. {
  17.   .text ${RELOCATING+ ${TEXT_START_ADDR}} : {
  18.     *(.init)
  19.     ${RELOCATING+ eprol  =  .};
  20.     *(.text)
  21.     *(.fini)
  22.     ${RELOCATING+ etext  =  .};
  23.   }
  24.   .rdata ${RELOCATING+ ${DATA_ADDR}} : {
  25.     *(.rdata)
  26.   }
  27.   .data ${RELOCATING+ .} : {
  28.     *(.data)
  29.     ${CONSTRUCTING+CONSTRUCTORS}
  30.   }
  31.   ${RELOCATING+ _gp = . + 0x8000;}
  32.   .lit8 ${RELOCATING+ .} : {
  33.     *(.lit8)
  34.   }
  35.   .lit4 ${RELOCATING+ .} : {
  36.     *(.lit4)
  37.   }
  38.   .sdata ${RELOCATING+ .} : {
  39.     *(.sdata)
  40.   }
  41.   ${RELOCATING+ edata  =  .;}
  42.   ${RELOCATING+ ${BSS_VAR}}
  43.   .sbss ${RELOCATING+ .} : {
  44.     *(.sbss)
  45.     *(.scommon)
  46.   }
  47.   .bss ${RELOCATING+ .} : {
  48.     *(.bss)
  49.     *(COMMON)
  50.   }
  51.   ${RELOCATING+ end = .;}
  52. }
  53. EOF
  54.