xref: /netbsd-src/external/gpl3/binutils.old/dist/ld/scripttempl/hppaelf.sc (revision e992f068c547fd6e84b3f104dc2340adcc955732)
1*e992f068Schristos# Copyright (C) 2014-2022 Free Software Foundation, Inc.
216dce513Schristos#
316dce513Schristos# Copying and distribution of this file, with or without modification,
416dce513Schristos# are permitted in any medium without royalty provided the copyright
516dce513Schristos# notice and this notice are preserved.
616dce513Schristos
716dce513SchristosDATA_ADDR=0x40000000
816dce513Schristostest "$LD_FLAG" = "N" && DATA_ADDR=.
916dce513Schristos
1016dce513Schristoscat <<EOF
11*e992f068Schristos/* Copyright (C) 2014-2022 Free Software Foundation, Inc.
1216dce513Schristos
1316dce513Schristos   Copying and distribution of this script, with or without modification,
1416dce513Schristos   are permitted in any medium without royalty provided the copyright
1516dce513Schristos   notice and this notice are preserved.  */
1616dce513Schristos
1716dce513SchristosOUTPUT_FORMAT("${OUTPUT_FORMAT}")
1816dce513SchristosOUTPUT_ARCH(${ARCH})
1916dce513Schristos${RELOCATING+ENTRY("\$START\$")}
2016dce513Schristos${RELOCATING+${LIB_SEARCH_DIRS}}
2116dce513SchristosSECTIONS
2216dce513Schristos{
2316dce513Schristos  .text 0x1000 ${RELOCATING++${TEXT_START_ADDR}}:
2416dce513Schristos  {
25012573ebSchristos    ${RELOCATING+__text_start = .;
26012573ebSchristos    CREATE_OBJECT_SYMBOLS}
2716dce513Schristos    *(.PARISC.stubs)
2816dce513Schristos    *(.text)
29012573ebSchristos    ${RELOCATING+etext = .;
30012573ebSchristos    _etext = .;}
3116dce513Schristos  }
3216dce513Schristos  ${RELOCATING+. = ${DATA_ADDR};}
3316dce513Schristos  .data :
3416dce513Schristos  {
35012573ebSchristos    ${RELOCATING+. = . + 0x1000;
36012573ebSchristos    __data_start = .;}
3716dce513Schristos    *(.data)
3816dce513Schristos    ${CONSTRUCTING+CONSTRUCTORS}
39012573ebSchristos    ${RELOCATING+edata = .;
40012573ebSchristos    _edata = .;}
4116dce513Schristos  }
4216dce513Schristos  ${RELOCATING+. = ${DATA_ADDR} + SIZEOF(.data);}
4316dce513Schristos  .bss :
4416dce513Schristos  {
4516dce513Schristos   *(.bss)
46012573ebSchristos   ${RELOCATING+*(COMMON)
47012573ebSchristos   end = .;
48012573ebSchristos   _end = .;}
4916dce513Schristos  }
5016dce513Schristos}
5116dce513SchristosEOF
52