summaryrefslogtreecommitdiff
path: root/ld/genscrba.sh
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2008-01-11 09:11:18 +0000
committerTristan Gingold <gingold@adacore.com>2008-01-11 09:11:18 +0000
commitbcf43e03a938336368902e4d3b897e5eb5623b79 (patch)
treee825f9da323ac82db45913306e2015e7dafa45a0 /ld/genscrba.sh
parentf60f1415a2b97ffb4c14063f4cb8a8d426ebb5c0 (diff)
downloadbinutils-redhat-bcf43e03a938336368902e4d3b897e5eb5623b79.tar.gz
ld:
2008-01-11 Tristan Gingold <gingold@adacore.com> Eric Botcazou <ebotcazou@adacore.com> * ldlang.c (lang_end): Warns if the entry point is not found when --gc-sections. Emit an error if no root is specified when --gc-sections -r. * ld.texinfo (Options): Document that --gc-sections is compatible with -r and -q. * ldmain.c (main): Do not error out if -r and --gc-sections. * scripttempl/elf.sc: Emit ENTRY command only if relocating. ld/testsuite: 2008-01-11 Tristan Gingold <gingold@adacore.com> * lib/ld-lib.exp (check_gc_sections_available): Now available on VxWorks. * ld-gc: New directory for testing --gc-sections. * ld-gc/gc.c: New file. * ld-gc/gc.exp: New file. * ld-gc/noent.s: New file. * ld-gc/noent.d: New file.
Diffstat (limited to 'ld/genscrba.sh')
-rw-r--r--ld/genscrba.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/ld/genscrba.sh b/ld/genscrba.sh
index 621de7ab47..030cb7d42e 100644
--- a/ld/genscrba.sh
+++ b/ld/genscrba.sh
@@ -8,7 +8,9 @@ source_em()
}
fragment()
{
- local lineno=$[${BASH_LINENO[0]} + 1]
- echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
+ if [ ${BASH_VERSINFO[3]} -ge 3 ]; then
+ local lineno=$[${BASH_LINENO[0]} + 1]
+ echo >> e${EMULATION_NAME}.c "#line $lineno \"$em_script\""
+ fi
cat >> e${EMULATION_NAME}.c
}