Skip to content

Do we need the bootstrap if we compile the loader statically? #42

Description

@illwieckz

On all platforms but Linux, no bootstrap is used. And in fact using the Windows loader on Linux will not use any bootstrap.

Maybe I'm wrong, but I suspect the bootstrap is there because we need to reserve some memory before the ld loader does some stuff.

But if the loader is statically compiled, the ld loader will do nothing.

In my branches I investigated building a static loader, but this was only on purpose to be able to redistribute a loader without libs (to make armhf multiarch works out of the box, this would also help box64 to not bundle libs). This was not done to remove the bootstrap, and unfortunately on arm, the bootstrap fails to load the static loader.

Now, if using a static loader removes the need for a bootstrap, then we don't have to care about the bootstrap not loading a static loader.

So:

  • is this true we don't need a bootstrap if the loader is fully static ?
  • do we need the loader to be a dynamic executable ?

On Linux it's common practice to dynamically link binaries because the glibc loads stuff at runtime. But maybe we don't need what glibc loads at runtime to begin with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions