aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/hppaelf.em
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-08-06 22:46:03 +0000
committerIan Lance Taylor <ian@airs.com>1999-08-06 22:46:03 +0000
commit597e25914ec5895fba8097946514d4b8c878eb0a (patch)
treefdc7d79e1329f02cd7685d15e9dc98a2d5072989 /ld/emultempl/hppaelf.em
parent4a607dcc2c50b3c622c4e12c405ef33d85ee7f5f (diff)
downloadfsf-binutils-gdb-597e25914ec5895fba8097946514d4b8c878eb0a.zip
fsf-binutils-gdb-597e25914ec5895fba8097946514d4b8c878eb0a.tar.gz
fsf-binutils-gdb-597e25914ec5895fba8097946514d4b8c878eb0a.tar.bz2
* emultempl/ostring.sed: Rename from stringify.sed.
* emultempl/astring.sed: New file. * Makefile.am (stringify.sed): New target. (GEN_DEPENDS): Change $(srcdir)/emultempl/stringify.sed to stringify.sed. * configure.in: Define and substitute STRINGIFY. * emultempl/*.em: Use stringify.sed from build directory rather than source directory. * emultempl/elf32.em: Use stringify.sed rather than inline sed script. * emultempl/gld960.em, emultempl/gld960c.em: Likewise. * emultempl/hppaelf.em, emultempl/linux.em: Likewise. * emultempl/lnk960.em, emultempl/sunos.em: Likewise. * configure, Makefile.in: Rebuild.
Diffstat (limited to 'ld/emultempl/hppaelf.em')
-rw-r--r--ld/emultempl/hppaelf.em29
1 files changed, 13 insertions, 16 deletions
diff --git a/ld/emultempl/hppaelf.em b/ld/emultempl/hppaelf.em
index c0ca113..69abe3b 100644
--- a/ld/emultempl/hppaelf.em
+++ b/ld/emultempl/hppaelf.em
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* An emulation for HP PA-RISC ELF linkers.
- Copyright (C) 1991, 93, 94, 95, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1991, 93, 94, 95, 97, 1999 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -216,28 +216,25 @@ then
# Scripts compiled in.
# sed commands to quote an ld script as a C string.
-sc='s/["\\]/\\&/g
-s/$/\\n\\/
-1s/^/"/
-$s/$/n"/
-'
+sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
{
*isfile = 0;
if (link_info.relocateable == true && config.build_constructors == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xu`;
- else if (link_info.relocateable == true)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xr`;
- else if (!config.text_read_only)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xbn`;
- else if (!config.magic_demand_paged)
- return `sed "$sc" ldscripts/${EMULATION_NAME}.xn`;
- else
- return `sed "$sc" ldscripts/${EMULATION_NAME}.x`;
-}
+ return
EOF
+sed $sc ldscripts/${EMULATION_NAME}.xu >> e${EMULATION_NAME}.c
+echo ' ; else if (link_info.relocateable == true) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xr >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.text_read_only) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xbn >> e${EMULATION_NAME}.c
+echo ' ; else if (!config.magic_demand_paged) return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.xn >> e${EMULATION_NAME}.c
+echo ' ; else return' >> e${EMULATION_NAME}.c
+sed $sc ldscripts/${EMULATION_NAME}.x >> e${EMULATION_NAME}.c
+echo '; }' >> e${EMULATION_NAME}.c
else
# Scripts read from the filesystem.