unikraft / static-pie-apps

Built Linux applications (static-pie) for Unikraft binary compatibility mode
7 stars 40 forks source link

Add Erlang as static PIE build #23

Closed razvand closed 1 year ago

razvand commented 2 years ago

Add Erlang as a -static-pie build. Test it natively on Linux and with run-elfloader on Unikraft. In case of issues with Unikraft, post an issue in the Unikraft core repository.

Follow the structure of existing applications or submitted for review applications: create a folder with build.sh script, a README.md file, a rootfs/ subfolder (if required), the -static-pie built executable and other useful files.

Hackathon points: 50

jalil-salame commented 1 year ago

Working on this

jalil-salame commented 1 year ago

Erlang otp https://github.com/erlang/otp, can't compile statically as erlc doesn't support static linking.

Reproduce with:

$ CFLAGS='-O2 -g -fPIE -static' CXXFLAGS='-O2 -g -fPIE -static' LDFLAGS='-static' ./configure --without-termcap --without-javac --without-ssl --enable-pie
...
$ make
...
  ERLC   ../ebin/leex.beam
dlsym: No such file or directory
...
razvand commented 1 year ago

10 points awarded