Re:Slim Binaries (1997)
by thefreeman on Wednesday July 31, 2019 @12:09PM
(#20575564)
Don't most compilers already do this?
[ Parent
| on HN ]
Speaking about C and C++ on Linux, I have an impression that the compilers seldom can decide that the whole functions aren't used, especially because most libraries and programs "export" "everything" by default, so only on run-time it can be decided what will be actually used -- the last linking step happens only when you start the program, by the loader.
Yeah, isn't this just link-time optimization?
Re:Slim Binaries (1997)
by throwaway542134 on Wednesday July 31, 2019 @01:21PM
(#20576306)
It's called dead code elimination/optimization and compilers can do it without LTO, with LTO you can can get more savings but ymmv.