tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Trivial program size inflation



On Tue, 4 Jul 2023, RVP wrote:

I think lld(1) does things differently. I'll check this later...


And I was right! On Linux (what I have at hand now):

```
$ clang -fuse-ld=lld -Wl,-Map=map.txt -static -s -o foo foo.c -L. -lmm

$ fgrep -A3 ./libmm.a map.txt
[...]
--
          224c30           224c30       13     1         ./libmm.a(calloc.o):(.text)
          224c30           224c30       13     1                 calloc
          224c50           224c50      ac3    16         /lib/x86_64-linux-gnu/libc.a(libc-start.o):(.text)
          224c50           224c50      398     1                 get_common_indices.constprop.1
--
          225f71           225f71       2d     1         ./libmm.a(malloc.o):(.text)
          225f71           225f71        f     1                 malloc
          225f80           225f80       13     1                 realloc
          225f93           225f93        b     1                 free
--
[...]
```

This is what I had expected from GNU ld(1) also...

-RVP


Home | Main Index | Thread Index | Old Index