Open jbowler opened 7 months ago
This is the generated 'pnglibconf.h' from the 'basic' configuration. It can be compared directly with an installed pnglibconf.h (e.g. /usr/include/pnglibconf.h) to see what I was able to disalbe. pnglibconf.h.TXT
Here is the actual result in terms of changed DLL sizes:
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
Section | Type | Full | Basic | Change -- | -- | -- | -- | -- .symtab | SYMTAB | 15192 | 12144 | 80% .rodata | PROGBITS | 18460 | 12020 | 65% .text | PROGBITS | 210915 | 132028 | 63% .got.plt | PROGBITS | 1152 | 832 | 72% .plt.got | PROGBITS | 16 | 8 | 50% .rela.dyn | RELA | 216 | 192 | 89% .rela.plt | RELA | 3384 | 2424 | 72% .got | PROGBITS | 48 | 40 | 83% .strtab | STRTAB | 11873 | 9295 | 78% .dynstr | STRTAB | 5397 | 4367 | 81% .dynsym | DYNSYM | 6984 | 5664 | 81% .plt | PROGBITS | 2272 | 1632 | 72% TOTAL | | 275909 | 180646 | 65%
libpng-ng will, with any luck, be able to remove or at least deprecate a range of APIs. As a first step I have built libpng16 with as many APIs as possible removed. This was achieved using a new configuration file, contrib/conftest/basic.dfa and a gentoo build of all the packages I have which depend directly on libpng (36 packages). The configuration was built up from pretty much everything disabled until I had a complete build of everything.
The result of this unfortunately still contains a large proportion of the 'read' APIs; the only read API which isn't used anywhere in those 36 packages is the "simplified" API. This probably reflects the fact that most of the packages have been around in one form or another form many years, probably dating back to libpng 1.4 or earlier.
On the other hand the 'write' code did seem to have fewer requirements despite being far simpler than the read side.