这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@Grimler91
Copy link
Member

Switch to getopt_long instead of our own arghandling. One side-effect is that options like -quiet -dry-run (with just one dash) will no longer work.

Also fix bug for api 21 where file would be modified even with --dry-run.

Fixes #28

Copy link
Member

@thunder-coding thunder-coding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@thunder-coding
Copy link
Member

thunder-coding commented Dec 30, 2024

I actually had the patch for this issue sitting in my old setup for sometime (like a year+), where I did the parsing myself instead of relying on getopt. But that partition now offered as a sacrifice to the Windows installation since I no longer use it, so it's lost forever :)

The previous arghandling code expected args in a certain order. Switch
to using getopt instead to solve the issue.
Even with --dry-run elf-cleaner modified the given binary. Fix the
issue.
Currently elf-cleaner prints identical messages if multiple version
sections are removed. Print which section is removed as well, so that
it is easier to understand what is going on.
They are not suppose to be run, and only user needs to be able to read
them.
@Grimler91 Grimler91 force-pushed the updates branch 2 times, most recently from 2121daa to b29e7eb Compare December 30, 2024 20:50
To make folder structure cleaner.

Also change help message from .. termux-elf-cleaner .. to just
.. elf-cleaner .., to make the tool even more general.
@Grimler91 Grimler91 merged commit b29e7eb into termux:master Jan 4, 2025
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

Successfully merging this pull request may close these issues.

Termux-elf-cleaner errors if arguments are passed in certain order

2 participants