delorie.com/archives/browse.cgi | search |
Hi, On Mar 29, 11:38=A0am, Eli Zaretskii <e DOT DOT DOT AT gnu DOT org> wrote: > > The one from ncurses, I think. =A0GNU ld is a one-pass linker, so it > will not load the functions from libc until it sees some other > function that calls them. Are you sure? I thought I read somewhere that it's two-pass for COFF and three-pass for ELF. But I dunno, it's way beyond my understanding! :-/ I submit to your vast experience here. ;-) P.S. GNU ld still links all *.o into the .EXE even if not used. I find that annoying. I was wondering why removing a #define and recompiling didn't shave any output size until I proved that. I also know that libs are better at being selective, so I ended up doing "ar rvs libdoy.a *.o" and thus "-L. -ldoy" saved me a tiny bit (only 4k in this example, but still ... !). Is this an inherent C problem or just GNU ld? (Some Pascal compilers have "smartlinking", but perhaps it's more complicated than I know.)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |