summaryrefslogtreecommitdiffstats
path: root/eshld
diff options
context:
space:
mode:
Diffstat (limited to 'eshld')
-rw-r--r--eshld/link.esh12
1 files changed, 7 insertions, 5 deletions
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.