Skip to content

Get latest changes from HaxeFoundation/neko #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Sep 4, 2015

Conversation

ppenzin
Copy link
Owner

@ppenzin ppenzin commented Sep 4, 2015

No description provided.

ncannasse and others added 16 commits July 18, 2015 16:36
executables made via 'nekotools boot <bytecode>' on Linux systems
(really systems using ELF ABI) will be irreprably damaged if stripped
by the 'strip' toolchain program.  The issue is described in detail
here...

  #75

The solution here is to modify the Neko VM and the nekotools programs
to be more ELF-aware.  This new code is activated by compiling with
ABI_ELF (now the default for Linux builds).

The Neko VM will now attempt to find a '.nekobytecode' section in the
executable by rifling through the ELF section headers.  If such a
section is found, it is inspected, looking for the customary bytecode
signature at the end of the section.  If the section is not found, the
code will fall back to the old algorithm and search at the end of the
file.  (This algorithm was necessary since tools like strip may
actually place other sections after the bytecode at the end of the
file, even if the bytecode section was initially at the end of the
file.)

Additionally, the 'nekotools' executable now understands how to inject
bytecode into the '.nekobytecode' section, resizing that section as
appropriate.  This allows this data to survive strip attempts.

Below are some measured performance and executable size impacts of
these changes as measured on my Fedora Core 17, x86_64 box that uses
Xeon processors...

  perf : 'neko -version' execution slowed by 32% or ~4.4ms/execution on my 2.53Ghz Xeon
  perf : 'nekoc -help' execution slowed by 4% or ~13.8ms/execution on my 2.53Ghz Xeon
  size : neko vm grew 2,880 bytes or ~23% larger; still under 16KB
  size : nekotools boot executables can be stripped now, making them 2%-8% smaller on x86_64
project files.  I am unable to test this, but it seems right.  I'll
let AppVeyor check it for me.
interpreter into libneko.  Move bytecode injection logic into std.ndll
where it belongs so that it can be visible to nekoboot.neko.  Also,
adjust symbol exposure of elf helper functions in libneko so that they
are properly accessible on Windows (hopefully).
Fix strip issue with 'nekotools boot' created executables on Linux ELF...
disable the ELF stuffs for OSX
ppenzin added a commit that referenced this pull request Sep 4, 2015
Get latest changes from HaxeFoundation/neko
@ppenzin ppenzin merged commit fe35be5 into ppenzin:master Sep 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants