171671b9obrien#!/bin/sh
271671b9obrien# genscripts.sh - generate the ld-emulation-target specific files
371671b9obrien#
471671b9obrien# Usage: genscripts_extra.sh \
571671b9obrien#          srcdir \
671671b9obrien#          libdir \
70acbbeedim#          prefix \
871671b9obrien#          exec_prefix \
971671b9obrien#          host \
1071671b9obrien#          target \
1171671b9obrien#          target_alias \
1271671b9obrien#          default_emulation \
1371671b9obrien#          native_lib_dirs \
1471671b9obrien#          use_sysroot \
1571671b9obrien#          this_emulation \
1671671b9obrien# optional:
1771671b9obrien#          tool_dir \
1871671b9obrien#          customizer_script
1971671b9obrien#
2071671b9obrien# Sample usage:
2171671b9obrien#
2271671b9obrien#   genscripts_extra.sh \
2371671b9obrien#    /sources/ld \
2471671b9obrien#    /usr/local/lib \
2571671b9obrien#    /usr/local \
260acbbeedim#    /usr/local \
2771671b9obrien#    sparc-sun-sunos4.1.3 \
2871671b9obrien#    sparc-sun-sunos4.1.3 \
2971671b9obrien#    sparc-sun-sunos4.1.3 \
3071671b9obrien#    sun4 \
3171671b9obrien#    "" \
3271671b9obrien#    no \
3371671b9obrien#    sun3 \
3471671b9obrien#    sparc-sun-sunos4.1.3 \
3571671b9obrien#    sparc.sh
3671671b9obrien#
3771671b9obrien# produces the linker scripts:
3871671b9obrien#
3971671b9obrien#   sun3.x       [default linker script]
4071671b9obrien#   sun3.xbn     [used when the linker is invoked with "-N"]
4171671b9obrien#   sun3.xn      [used when the linker is invoked with "-n"]
4271671b9obrien#   sun3.xr      [used when the linker is invoked with "-r"]
4371671b9obrien#   sun3.xu      [used when the linker is invoked with "-Ur"]
4471671b9obrien# and maybe:
4571671b9obrien#   sun3.xc      [used when the linker is invoked with "-z combreloc"]
4671671b9obrien#   sun3.xsc     [used when the linker is invoked with "--shared"]
4771671b9obrien#   sun3.xdc     [used when the linker is invoked with "-pie"]
4871671b9obrien#
4971671b9obrien# It also produced the C source file:
5071671b9obrien#
5171671b9obrien#   em_sun3.c
5271671b9obrien#
5371671b9obrien# which is then compiled into the linker.
5471671b9obrien#
5571671b9obrien# The linker scripts are created by running the shell script
5671671b9obrien# /sources/ld/emulparams/sparc.sh to set the value of ${SCRIPT_NAME}
5771671b9obrien# (and any other variables it wants to).  ${SCRIPT_NAME} is then
5871671b9obrien# invoked with a variable called ${LD_FLAG} to tell it which version
5971671b9obrien# of the linker script to create.
6071671b9obrien
6171671b9obrien
6271671b9obriensrcdir=$1
6371671b9obrienlibdir=$2
640acbbeedimprefix=$3
650acbbeedimexec_prefix=$4
660acbbeedimhost=$5
670acbbeedimtarget=$6
680acbbeedimtarget_alias=$7
690acbbeedimEMULATION_LIBPATH=$8
700acbbeedimNATIVE_LIB_DIRS=$9
7171671b9obrienshift 9
720acbbeedimuse_sysroot=$1
730acbbeedimEMULATION_NAME=$2
740acbbeedimTOOL_LIB=$3
750acbbeedimCUSTOMIZER_SCRIPT=$4
7671671b9obrien
7771671b9obrien# Can't use ${TOOL_LIB:-$target_alias} here due to an Ultrix shell bug.
7871671b9obrienif [ "x${TOOL_LIB}" = "x" ] ; then
7971671b9obrien  tool_lib=${exec_prefix}/${target_alias}/lib
8071671b9obrienelse
8171671b9obrien  tool_lib=${exec_prefix}/${TOOL_LIB}/lib
8271671b9obrienfi
8371671b9obrien
8471671b9obrienif [ "x${CUSTOMIZER_SCRIPT}" = "x" ] ; then
8571671b9obrien  CUSTOMIZER_SCRIPT=${EMULATION_NAME}
8671671b9obrienfi
8771671b9obrienCUSTOMIZER_SCRIPT="${srcdir}/emulparams/${CUSTOMIZER_SCRIPT}.sh"
8871671b9obrien
8971671b9obrien# Include the emulation-specific parameters:
9071671b9obrien. ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
9171671b9obrien
9271671b9obrienif test -d ldscripts; then
9371671b9obrien  true
9471671b9obrienelse
9571671b9obrien  mkdir ldscripts
9671671b9obrienfi
9771671b9obrien
9871671b9obrien# Set some flags for the emultempl scripts.  USE_LIBPATH will
9971671b9obrien# be set for any libpath-using emulation; NATIVE will be set for a
10071671b9obrien# libpath-using emulation where ${host} = ${target}.  NATIVE
10171671b9obrien# may already have been set by the emulparams file, but that's OK
10271671b9obrien# (it'll just get set to "yes" twice).
10371671b9obrien
10471671b9obriencase " $EMULATION_LIBPATH " in
10571671b9obrien  *" ${EMULATION_NAME} "*)
10671671b9obrien    if [ "x${host}" = "x${target}" ] ; then
10771671b9obrien      NATIVE=yes
10871671b9obrien      USE_LIBPATH=yes
10971671b9obrien    elif [ "x${use_sysroot}" = "xyes" ] ; then
11071671b9obrien      USE_LIBPATH=yes
11171671b9obrien    fi
11271671b9obrien    ;;
11371671b9obrienesac
11471671b9obrien
11571671b9obrien# If the emulparams file sets NATIVE, make sure USE_LIBPATH is set also.
11671671b9obrienif test "x$NATIVE" = "xyes" ; then
11771671b9obrien  USE_LIBPATH=yes
11871671b9obrienfi
11971671b9obrien
12071671b9obrien# Set the library search path, for libraries named by -lfoo.
12171671b9obrien# If LIB_PATH is defined (e.g., by Makefile) and non-empty, it is used.
12271671b9obrien# Otherwise, the default is set here.
12371671b9obrien#
12471671b9obrien# The format is the usual list of colon-separated directories.
12571671b9obrien# To force a logically empty LIB_PATH, do LIBPATH=":".
12671671b9obrien#
12771671b9obrien# If we are using a sysroot, prefix library paths with "=" to indicate this.
12871671b9obrien#
12971671b9obrien# If the emulparams file set LIBPATH_SUFFIX, prepend an extra copy of
13071671b9obrien# the library path with the suffix applied.
13171671b9obrien
13271671b9obrienif [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
13371671b9obrien  LIB_PATH2=
13471671b9obrien
13571671b9obrien  libs=${NATIVE_LIB_DIRS}
13671671b9obrien  if [ "x${use_sysroot}" != "xyes" ] ; then
13771671b9obrien    case " ${libs} " in
13871671b9obrien      *" ${libdir} "*) ;;
13971671b9obrien      *) libs="${libdir} ${libs}" ;;
14071671b9obrien    esac
14171671b9obrien    case " ${libs} " in
14271671b9obrien      *" ${tool_lib} "*) ;;
14371671b9obrien      *) libs="${tool_lib} ${libs}" ;;
14471671b9obrien    esac
14571671b9obrien  fi
14671671b9obrien
14771671b9obrien  for lib in ${libs}; do
14871671b9obrien    # The "=" is harmless if we aren't using a sysroot, but also needless.
14971671b9obrien    if [ "x${use_sysroot}" = "xyes" ] ; then
15071671b9obrien      lib="=${lib}"
15171671b9obrien    fi
15271671b9obrien    addsuffix=
15371671b9obrien    case "${LIBPATH_SUFFIX}:${lib}" in
15471671b9obrien      :*) ;;
15571671b9obrien      *:*${LIBPATH_SUFFIX}) ;;
15671671b9obrien      *) addsuffix=yes ;;
15771671b9obrien    esac
15871671b9obrien    if test -n "$addsuffix"; then
15971671b9obrien      case :${LIB_PATH}: in
16071671b9obrien	*:${lib}${LIBPATH_SUFFIX}:*) ;;
16171671b9obrien	::) LIB_PATH=${lib}${LIBPATH_SUFFIX} ;;
16271671b9obrien	*) LIB_PATH=${LIB_PATH}:${lib}${LIBPATH_SUFFIX} ;;
16371671b9obrien      esac
16471671b9obrien      case :${LIB_PATH}:${LIB_PATH2}: in
16571671b9obrien	*:${lib}:*) ;;
16671671b9obrien	*::) LIB_PATH2=${lib} ;;
16771671b9obrien	*) LIB_PATH2=${LIB_PATH2}:${lib} ;;
16871671b9obrien      esac
16971671b9obrien    else
17071671b9obrien      case :${LIB_PATH2}: in
17171671b9obrien	*:${lib}:*) ;;
17271671b9obrien	::) LIB_PATH2=${lib} ;;
17371671b9obrien	*) LIB_PATH2=${LIB_PATH2}:${lib} ;;
17471671b9obrien      esac
17571671b9obrien    fi
17671671b9obrien  done
17771671b9obrien
17871671b9obrien  case :${LIB_PATH}:${LIB_PATH2}: in
17971671b9obrien    *:: | ::*) LIB_PATH=${LIB_PATH}${LIB_PATH2} ;;
18071671b9obrien    *) LIB_PATH=${LIB_PATH}:${LIB_PATH2} ;;
18171671b9obrien  esac
18271671b9obrienfi
18371671b9obrien
18471671b9obrien# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib, except for
18571671b9obrien# sysrooted configurations and when LIBPATH=":".
18671671b9obrienif [ "x${use_sysroot}" != "xyes" ] ; then
18771671b9obrien  case :${LIB_PATH}: in
18871671b9obrien  ::: | *:${tool_lib}:*) ;;
18971671b9obrien  ::) LIB_PATH=${tool_lib} ;;
19071671b9obrien  *) LIB_PATH=${tool_lib}:${LIB_PATH} ;;
19171671b9obrien  esac
192d0f678fdim  # For multilib targets, search both $tool_lib dirs
193d0f678fdim  if [ "x${LIBPATH_SUFFIX}" != "x" ] ; then
194d0f678fdim    case :${LIB_PATH}: in
195d0f678fdim      ::: | *:${tool_lib}${LIBPATH_SUFFIX}:*) ;;
196d0f678fdim      ::) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX} ;;
197d0f678fdim      *) LIB_PATH=${tool_lib}${LIBPATH_SUFFIX}:${LIB_PATH} ;;
198d0f678fdim    esac
199d0f678fdim  fi
20071671b9obrienfi
20171671b9obrien
20271671b9obrienLIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");/g'`
20371671b9obrien
20471671b9obrien# We need it for testsuite.
2050acbbeedimset $EMULATION_LIBPATH
2060acbbeedimif [ "x$1" = "x$EMULATION_NAME" ]; then
20771671b9obrien    test -d tmpdir || mkdir tmpdir
2080acbbeedim    rm -f tmpdir/libpath.exp
20971671b9obrien    echo "set libpath \"${LIB_PATH}\"" | sed -e 's/:/ /g' > tmpdir/libpath.exp
2100acbbeedimfi
21171671b9obrien
21271671b9obrien# Generate 5 or 6 script files from a master script template in
21371671b9obrien# ${srcdir}/scripttempl/${SCRIPT_NAME}.sh.  Which one of the 5 or 6
21471671b9obrien# script files is actually used depends on command line options given
21571671b9obrien# to ld.  (SCRIPT_NAME was set in the emulparams_file.)
21671671b9obrien#
21771671b9obrien# A .x script file is the default script.
21871671b9obrien# A .xr script is for linking without relocation (-r flag).
21971671b9obrien# A .xu script is like .xr, but *do* create constructors (-Ur flag).
22071671b9obrien# A .xn script is for linking with -n flag (mix text and data on same page).
22171671b9obrien# A .xbn script is for linking with -N flag (mix text and data on same page).
22271671b9obrien# A .xs script is for generating a shared library with the --shared
22371671b9obrien#   flag; it is only generated if $GENERATE_SHLIB_SCRIPT is set by the
22471671b9obrien#   emulation parameters.
22571671b9obrien# A .xc script is for linking with -z combreloc; it is only generated if
22671671b9obrien#   $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
22771671b9obrien#   $SCRIPT_NAME is "elf".
22871671b9obrien# A .xsc script is for linking with --shared -z combreloc; it is generated
22971671b9obrien#   if $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
23071671b9obrien#   $SCRIPT_NAME is "elf" and $GENERATE_SHLIB_SCRIPT is set by the emulation
23171671b9obrien#   parameters too.
23271671b9obrien
23371671b9obrienif [ "x$SCRIPT_NAME" = "xelf" ]; then
23471671b9obrien  GENERATE_COMBRELOC_SCRIPT=yes
23571671b9obrienfi
23671671b9obrien
23771671b9obrienSEGMENT_SIZE=${SEGMENT_SIZE-${MAXPAGESIZE-${TARGET_PAGE_SIZE}}}
23871671b9obrien
23971671b9obrien# Determine DATA_ALIGNMENT for the 5 variants, using
24071671b9obrien# values specified in the emulparams/<script_to_run>.sh file or default.
24171671b9obrien
24271671b9obrienDATA_ALIGNMENT_="${DATA_ALIGNMENT_-${DATA_ALIGNMENT-ALIGN(${SEGMENT_SIZE})}}"
24371671b9obrienDATA_ALIGNMENT_n="${DATA_ALIGNMENT_n-${DATA_ALIGNMENT_}}"
24471671b9obrienDATA_ALIGNMENT_N="${DATA_ALIGNMENT_N-${DATA_ALIGNMENT-.}}"
24571671b9obrienDATA_ALIGNMENT_r="${DATA_ALIGNMENT_r-${DATA_ALIGNMENT-}}"
24671671b9obrienDATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
24771671b9obrien
24871671b9obrienLD_FLAG=r
24971671b9obrienDATA_ALIGNMENT=${DATA_ALIGNMENT_r}
25071671b9obrienDEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
25171671b9obrien( echo "/* Script for ld -r: link without relocation */"
25271671b9obrien  . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
25371671b9obrien  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
25471671b9obrien) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xr
25571671b9obrien
25671671b9obrienLD_FLAG=u
25771671b9obrienDATA_ALIGNMENT=${DATA_ALIGNMENT_u}
25871671b9obrienCONSTRUCTING=" "
25971671b9obrien( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
26071671b9obrien  . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
26171671b9obrien  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
26271671b9obrien) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xu
26371671b9obrien
26471671b9obrienLD_FLAG=
26571671b9obrienDATA_ALIGNMENT=${DATA_ALIGNMENT_}
26671671b9obrienRELOCATING=" "
26771671b9obrien( echo "/* Default linker script, for normal executables */"
26871671b9obrien  . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
26971671b9obrien  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
27071671b9obrien) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.x
27171671b9obrien
27271671b9obrienLD_FLAG=n
27371671b9obrienDATA_ALIGNMENT=${DATA_ALIGNMENT_n}
27471671b9obrienTEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
27571671b9obrien( echo "/* Script for -n: mix text and data on same page */"
27671671b9obrien  . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
27771671b9obrien  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
27871671b9obrien) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xn
27971671b9obrien
28071671b9obrienLD_FLAG=N
28171671b9obrienDATA_ALIGNMENT=${DATA_ALIGNMENT_N}
28271671b9obrien( echo "/* Script for -N: mix text and data on same page; don't align data */"
28371671b9obrien  . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
28471671b9obrien  . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
28571671b9obrien) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xbn
28671671b9obrien
28771671b9obrienif test -n "$GENERATE_COMBRELOC_SCRIPT"; then
28871671b9obrien  DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
28971671b9obrien  LD_FLAG=c
29071671b9obrien  COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
29171671b9obrien  ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
29271671b9obrien    . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
29371671b9obrien    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
29471671b9obrien  ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xc
29571671b9obrien  rm -f ${COMBRELOC}
2960acbbeedim  LD_FLAG=w
2970acbbeedim  RELRO_NOW=" "
2980acbbeedim  COMBRELOC=ldscripts/${EMULATION_NAME}.xw.tmp
2990acbbeedim  ( echo "/* Script for -z combreloc -z now -z relro: combine and sort reloc sections */"
3000acbbeedim    . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
3010acbbeedim    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
3020acbbeedim  ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xw
3030acbbeedim  rm -f ${COMBRELOC}
30471671b9obrien  COMBRELOC=
3050acbbeedim  unset RELRO_NOW
30671671b9obrienfi
30771671b9obrien
30871671b9obrienif test -n "$GENERATE_SHLIB_SCRIPT"; then
30971671b9obrien  LD_FLAG=shared
31071671b9obrien  DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
31171671b9obrien  CREATE_SHLIB=" "
31271671b9obrien  # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
31371671b9obrien  (
31471671b9obrien    echo "/* Script for ld --shared: link shared library */"
31571671b9obrien    . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
31671671b9obrien    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
31771671b9obrien  ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xs
31871671b9obrien  if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
31971671b9obrien    LD_FLAG=cshared
32071671b9obrien    DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
3210acbbeedim    COMBRELOC=ldscripts/${EMULATION_NAME}.xsc.tmp
32271671b9obrien    ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
32371671b9obrien      . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
32471671b9obrien      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
32571671b9obrien    ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xsc
32671671b9obrien    rm -f ${COMBRELOC}
3270acbbeedim    LD_FLAG=wshared
3280acbbeedim    RELRO_NOW=" "
3290acbbeedim    COMBRELOC=ldscripts/${EMULATION_NAME}.xsw.tmp
3300acbbeedim    ( echo "/* Script for --shared -z combreloc -z now -z relro: shared library, combine & sort relocs */"
3310acbbeedim      . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
3320acbbeedim      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
3330acbbeedim    ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xsw
3340acbbeedim    rm -f ${COMBRELOC}
33571671b9obrien    COMBRELOC=
3360acbbeedim    unset RELRO_NOW
33771671b9obrien  fi
33871671b9obrien  unset CREATE_SHLIB
33971671b9obrienfi
34071671b9obrien
34171671b9obrienif test -n "$GENERATE_PIE_SCRIPT"; then
34271671b9obrien  LD_FLAG=pie
34371671b9obrien  DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
34471671b9obrien  CREATE_PIE=" "
34571671b9obrien  # Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
34671671b9obrien  (
34771671b9obrien    echo "/* Script for ld -pie: link position independent executable */"
34871671b9obrien    . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
34971671b9obrien    . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
35071671b9obrien  ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xd
35171671b9obrien  if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
35271671b9obrien    LD_FLAG=cpie
35371671b9obrien    DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
3540acbbeedim    COMBRELOC=ldscripts/${EMULATION_NAME}.xdc.tmp
35571671b9obrien    ( echo "/* Script for -pie -z combreloc: position independent executable, combine & sort relocs */"
35671671b9obrien      . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
35771671b9obrien      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
35871671b9obrien    ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xdc
35971671b9obrien    rm -f ${COMBRELOC}
3600acbbeedim    LD_FLAG=wpie
3610acbbeedim    RELRO_NOW=" "
3620acbbeedim    COMBRELOC=ldscripts/${EMULATION_NAME}.xdw.tmp
3630acbbeedim    ( echo "/* Script for -pie -z combreloc -z now -z relro: position independent executable, combine & sort relocs */"
3640acbbeedim      . ${CUSTOMIZER_SCRIPT} ${EMULATION_NAME}
3650acbbeedim      . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
3660acbbeedim    ) | sed -e '/^ *$/d;s/[ 	]*$//' > ldscripts/${EMULATION_NAME}.xdw
3670acbbeedim    rm -f ${COMBRELOC}
36871671b9obrien    COMBRELOC=
3690acbbeedim    unset RELRO_NOW
37071671b9obrien  fi
37171671b9obrien  unset CREATE_PIE
37271671b9obrienfi
37371671b9obrien
37471671b9obriencase " $EMULATION_LIBPATH " in
37571671b9obrien    *" ${EMULATION_NAME} "*) COMPILE_IN=true;;
37671671b9obrienesac
37771671b9obrien
37871671b9obrien# Generate e${EMULATION_NAME}.c.
37971671b9obrien. ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
380