diff options
author | P. J. McDermott <pj@pehjota.net> | 2016-02-28 16:00:07 (EST) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2016-02-28 16:00:07 (EST) |
commit | 3d34b165768b348f6a6ebee698ecbc9250966423 (patch) | |
tree | 6666047c1a5c78426a65f24c4760375155309d9b | |
parent | 2f7c999bf91b79eb53ed926a12b2c97fcb2800b8 (diff) | |
download | eggshell-3d34b165768b348f6a6ebee698ecbc9250966423.zip eggshell-3d34b165768b348f6a6ebee698ecbc9250966423.tar.gz eggshell-3d34b165768b348f6a6ebee698ecbc9250966423.tar.bz2 |
eshld: Use eshrt from eshtrans
-rw-r--r-- | eshld/link.esh | 12 |
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. |