X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=ld%2Fgenscrba.sh;fp=ld%2Fgenscrba.sh;h=030cb7d42ecc1aae851843a27e9aa44e8f5cfc00;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hp=0000000000000000000000000000000000000000;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10;p=msp430-binutils.git diff --git a/ld/genscrba.sh b/ld/genscrba.sh new file mode 100644 index 0000000..030cb7d --- /dev/null +++ b/ld/genscrba.sh @@ -0,0 +1,16 @@ +#!/bin/bash +source_em() +{ + local current_script="$em_script" + em_script=$1 + . $em_script + em_script=$current_script +} +fragment() +{ + 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 +}