From bcf43e03a938336368902e4d3b897e5eb5623b79 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 11 Jan 2008 09:11:18 +0000 Subject: ld: 2008-01-11 Tristan Gingold Eric Botcazou * 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 * 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. --- ld/genscrba.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ld/genscrba.sh') 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 } -- cgit v1.2.1