Skip to content
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

upx compatibility(Cannot pack after postject-ed) #87

Open
y3k00000 opened this issue May 31, 2023 · 2 comments
Open

upx compatibility(Cannot pack after postject-ed) #87

y3k00000 opened this issue May 31, 2023 · 2 comments

Comments

@y3k00000
Copy link

y3k00000 commented May 31, 2023

I followed NodeJS Official SEA instructions and ended up with an executable that seems works fine.

After that I was advancing to pack the postject-ed executable with upx packer but it turns out to be failing with an error:
image

while the original node executable can be packed fine.

Don't know what's happening, I wonder is this a limitation or why is this be happening?

@RaisinTen
Copy link
Contributor

Okay, so you're trying this on an ELF binary and https://github.com/upx/upx/blob/dae45ae0d4e569e071279bac1693a447934a1363/src/p_lx_elf.cpp#L2544-L2547 is where the error is coming from.

while the original node executable can be packed fine.

Could you confirm if the packed original node executable also runs without errors? (I'm asking because I just tried using upx 4.0.2 from brew on the original Node.js v20.2.0 official x86_64 macOS binary and it looks like upx works without errors but running the resultant executable segfaults)

Also, does passing the --force-execve option to upx, as suggested in the error, help in any way?

@HCLonely
Copy link

It works fine on windows, but I had the same problem on linux.

image

And the original node executable works fine on both systems.

It was tested on

NodeJS: v21.6.2
UPX: v4.2.2
OS: Windows 11 Pro 23H2 & Ubuntu 22.04.4 LTS

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

No branches or pull requests

3 participants