From 3d34b165768b348f6a6ebee698ecbc9250966423 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sun, 28 Feb 2016 16:00:07 -0500 Subject: eshld: Use eshrt from eshtrans --- (limited to 'eshld') diff --git a/eshld/link.esh b/eshld/link.esh index f2ad486..4626863 100644 --- a/eshld/link.esh +++ b/eshld/link.esh @@ -50,10 +50,12 @@ link_begin() die 'Cannot open file "%s"' "${output}~" fi - # Add a magic number with interpreter path and the runtime library. + # Add magic number (with interpreter path), entry point name, and + # runtime library. if ${make_executable}; then - printf '#!%s\n' "${interpreter}" >&3 - eshrtbegin >&3 + printf '#!%s\n__entry=%s\n' "${interpreter}" "${entry_point}" \ + >&3 + cat "$(dirname "${0}")/../eshtrans/eshrt/eshrtbegin.sh2" >&3 fi } @@ -68,9 +70,9 @@ link_file() link_end() { - # Add calls to __init functions and the entry point. + # Add runtime library. if ${make_executable}; then - eshrtend "${entry_point}" >&3 + cat "$(dirname "${0}")/../eshtrans/eshrt/eshrtend.sh2" >&3 fi # Close output file, make it executable, and set its name. -- cgit v0.9.1