strip producing invalid executable

Paul Edwards mutazilah@gmail.com
Mon Sep 15 17:53:50 GMT 2025


On Mon, Sep 15, 2025 at 6:33 AM H.J. Lu <hjl.tools@gmail.com> wrote:

> The section header is wrong:
>
> The SHF_ALLOC bit is unset on  .text  and .data sections.

Thanks a lot for that diagnosis. The pdld author has fixed
that issue plus another anomaly, and now strip is handling
the executable.

I don't have any comment about whether strip should be
able to detect a defective but working executable as I
provided. I'm focused on fixing definite bugs.

Note that strip is actually producing a larger executable now:

2025-09-16  01:16 AM            39,436 pdptest.orig4
2025-09-16  01:16 AM            39,476 pdptest.strip4

Available in this NEW file:

https://pdos.org/stripbug2.zip

Apparently due to harmless rearranging done by strip.

The pdld author says both are valid, but thought you might
be interested in rearranging sections to conserve space.

So just letting you know in case you are.

Or if you believe he is using non-standard ordering, please
let me know.

Thanks. Paul.


More information about the Binutils mailing list