> I am trying to build a unicode embedded text editor. For unicode text
> layout engine, I am using harfbuzz, freetype both of which have lot of
> dependency on glibc, libz and others.
> I am build my code with dynamic linking which runs well enough. But as
> I need to strip the code down to smallest size for embedded operation, I
> want to keep only needed parts of the supporting libraries.
> I used kcachegrind to trace function calls and isolate involved c files
> and pare them to only needed functions. But now the biggest challenge is
> with respect of header files. I see hundreds of header files, some of
> which are even bigger than the target code size.There are circular
> Now I want to know if there is any automated tool or compiler options
> which will help me only compile the needed parts, i.e section the C and
> header files into needed and un-needed.
> I am new to this. Any advise in the right direction will be of great
> help. Thanks in advance.
I’m not clear why you care about how many headers there are. They don’t
contribute to code size, do they?