Skip to content

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

Open

Description

@y3k00000

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?

Activity

  1. RaisinTen commented on Jun 1, 2023

    @RaisinTen
    Member

    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?

  2. HCLonely commented on Feb 22, 2024

    @HCLonely

    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
    
  3. ddadaal commented on Feb 20, 2025

    @ddadaal

    Can confirm this in Linux Node 22 and 23. Node binary itself can be upx-ed and works fine, but postject-ed SEA fails to run with bad e_phoff.

  4. Sfinx commented on Mar 6, 2025

    @Sfinx

    See the upx/upx#892

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions