Re: [dev] [st] font fallback

From: Charlie Kester <corky1951_AT_comcast.net>
Date: Sat, 05 Jan 2013 12:48:49 -0800

On 01/05/2013 09:55 AM, Christoph Lohmann wrote:
> Greetings.
>
> On Sat, 05 Jan 2013 18:55:12 +0100 Charlie Kester<corky1951_AT_comcast.net> wrote:
>> Of course, some growth is expected as new features are added, but going
>> from 38k to 618k is hard to swallow.
>
> On my system:
>
> % ls -hs st-0.3/st
> 126K st
> % strip st-0.3/st&& ls -hs st-0.3/st
> 48K
> % ls -hs scm/st/st
> 178K
> % strip scm/st/st&& ls -hs scm/st/st
> 91K st


Interesting. I get much a much bigger executable with the latest git.

So I dug a little deeper and the problem seems to occur when pkg-config
adds -lfreetype to the linker flags.

Omitting that linker flag gets me a 85k binary after stripping, fwiw.

It seems to run OK too. Do I really need to explicitly link to the
freetype library? I don't see any complaints from the linker about
unresolved symbols...

ldd reports that my copy of st built without -lfreetype is using
libfreetype.so.6.

So it seems that something is already pulling it in.

Hmm. I wonder if I was somehow linking to the static version of the
freetype library? That might explain the font-related stuff I found in
the .rodata section, and maybe the .eh_frame* stuff too.

Weird!

Sorry for the noise.
Received on Sat Jan 05 2013 - 21:48:49 CET

This archive was generated by hypermail 2.3.0 : Sat Jan 05 2013 - 21:48:04 CET