~mirabilos/klibc/master

Viewing all changes in revision 2205.

  • Committer: Ben Hutchings
  • Date: 2022-08-05 23:30:28 UTC
  • Revision ID: git-v1:05eee5acb41c12ceb6e5e51ccfb2442271128679
[klibc] Work around ELF loader bugs when executables have only BSS

Some of klibc's test programs have BSS but no static data when built
to use the shared library.  This is apparently very unusual, and
existing ELF loaders don't always handle it correctly.

I previously found that QEMU's ELF loader rejected such executables,
though this was eventually fixed.

Now a change in binutils for arm64 has revealed a bug in the kernel
ELF loader, that's causing it to reject those same executables.  While
this might get fixed in one way or another, I think it's a sign that
this case is just not tested and it would be best to avoid it.

Therefore:

- Rename interp.S to shared-stub.S
- Add a single byte of static data to it

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: