Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Aidan Kehoe Newsgroups: comp.os.linux.misc,alt.usage.english Subject: Re: GNU Date: Fri, 27 Mar 2026 17:33:02 +0000 Message-ID: <87pl4puqi9.fsf@parhasard.net> References: <10ojmjv$2ashr$1@dont-email.me> <10q03vf$1o2ev$1@dont-email.me> <10q0c18$1qua9$1@dont-email.me> <10q0f40$1s10c$1@dont-email.me> <10q1etr$9gh8$1@artemis.inf.ed.ac.uk> <10q2o3v$nqm7$1@news1.tnib.de> <10q3kgr$2val0$1@dont-email.me> <1774547182-12588@newsgrouper.org> <10q5mlv$3la8r$1@dont-email.me> <20260327083143.000027a9@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: solani.org; logging-data="808096"; mail-complaints-to="abuse@news.solani.org" User-Agent: Gnus/5.101 (Gnus v5.10.10) XEmacs/21.5-b36 (Linux-aarch64) Cancel-Lock: sha1:PEHqZIWM6j1HuuFcP262jKTjLfQ= sha1:hpsTiQfnisE9shozUkK7+OsW7sY= X-User-ID: eJwFwYERACEIA7CVrNDyjuMJ3X+ETxiCXqWopGlIXsbBPZvDSfYseE9UMYBHjH2jP281+wcP0hED Xref: csiph.com comp.os.linux.misc:84204 alt.usage.english:1141139 Ar an seachtú lá is fiche de mí Márta, scríobh John Ames: > On Fri, 27 Mar 2026 21:37:48 +1100 > Peter Moylan wrote: > > > and included a smart linker that deleted library functions that were > > never called. > > Mind-boggling to me how rare this has been over the decades. I suppose > there's an extent to which you need to be certain that a function won't > *ever* be invoked, but it's not like we haven't had call graph analysis > for aeons; take the worst-case what-if graph and strip out everything > that isn't on it, and presto. As you’d expect the current link time optimization, -flto, of GCC does it at higher optimization levels. Complicating this is that on ELF platforms there’s no way to be certain a DLL loaded by the program won’t call a function in the main program; Windows and macOS require that the functions exported be explicitly marked as such, which makes it more practical. -- ‘As I sat looking up at the Guinness ad, I could never figure out / How your man stayed up on the surfboard after fourteen pints of stout’ (C. Moore)