Ángel

@angel@triptico.com



curmudgeon / cascarrabias

wwwhttps://triptico.com
geminigemini://triptico.com
tilde.clubhttps://tilde.club/~angel/
Ann Hell Musichttps://exode.me/accounts/annhell
Keyoxidehttps://keyoxide.org/hkp/1AFAE6809099EB5CD65A4E32B498DDC28F4584FF
YO NO SOY PAVEL (novela)https://distrito93.com/catalogo/yo-no-soy-pavel/
1 ★ 1 ↺

Ángel »
@angel@triptico.com

TIL that there is something named linker optimization that forces the deletion of unused functions in your final executable. As a bonus, you get the list of unused functions as compiler warnings (dead code is always bad, so you get the change to delete them or comment them out).

If you have a standard build system, do the following:

make CFLAGS="-ffunction-sections -fdata-sections" LDFLAGS="-Wl,--gc-sections -Wl,--print-gc-sections"

History