Skip to content

Update make_nmap.sh#21

Open
eakteam wants to merge 1 commit intoruvolof:masterfrom
eakteam:patch-1
Open

Update make_nmap.sh#21
eakteam wants to merge 1 commit intoruvolof:masterfrom
eakteam:patch-1

Conversation

@eakteam
Copy link

@eakteam eakteam commented Oct 24, 2025

Adding this custom flags meant to inject tight optimization, full static linking, and control over visibility for a smaller, faster, hardened binary.

Also it makes nmap binary from 20+Mb original to ~8Mb in space

Adding this custom flags meant to inject tight optimization, full static linking, and control over visibility for a smaller, faster, hardened binary.

Also it makes nmap binary from 20+Mb original to ~8Mb in space
@ruvolof
Copy link
Owner

ruvolof commented Oct 25, 2025

Hello! Thanks, I really appreciate the input! I'll have a look at this in the next few days!

@ruvolof
Copy link
Owner

ruvolof commented Nov 3, 2025

First of all thanks again for the input. I'm interested in the idea of making the executable smaller.

It seems that most of the optimization regarding space are performed by Android Studio when bundling the application. I can verify the reduced size from 20mb to 8mb in the output of the nmap compilation, however even without these optimization the final size of the binary in the app bundle is 8.9mb, while with your optimization is 8.3mb. So this is less critical than it seemed initially.

Also I think that some flags are redundant, for example the CFLAGS are also passed to the build-lua target, and removing the LUA_CFLAGS from your patch keeps the output the same. And maybe some of the CFLAGS and CXXFLAGS can be passed with the CCOPT variable?

I would like to keep it as simple as possible to avoid possible compilation issues in the future and reduce maintenance time (if, for example, the official makefile changes).

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.

2 participants