A modest proposal: eliminate template code bloat

Marco Leise Marco.Leise at gmx.de
Sun Apr 8 09:01:04 PDT 2012


Am Sun, 8 Apr 2012 07:18:26 -0700
schrieb "H. S. Teoh" <hsteoh at quickfur.ath.cx>:

> We'd have to make sure the checksum doesn't end up in the final
> executable though, otherwise the bloat may negate any gains we've made.

Executables (and object files) are made up mostly of sections, some of which are 'special cased' to contain the code, zero initialized data, thread local storage etc. and some user defined. The checksums would most probably end up in their own section, like is already happening for debug info or comments. Using a tool like strip you can remove any section by its name.

Once a linker knows how to use the checksums, it would strip them by default.

-- 
Marco



More information about the Digitalmars-d mailing list