Re: ld compat linker warnings considered harmful
Robert Swindells <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
Thomas Klausner <[email protected]> wrote: > For library function renaming to work, NetBSD uses header macros to > use the latest version of a function, so that the old symbol still > stays available for programs that were linked against the previous > version of the function. > > There is also a linker warning so that you do not use the old > functions by accident, because you forgot including the header, e.g.: > > ld: /usr/lib/libm.so.0: warning: warning: reference to compatibility cabs() > > The (known) problem is that this linker warning also triggers when it > shouldn't, when libraries are pulled in indirectly and the functions > not even used by the program that (indirectly) links against them. Do any of the alternative linkers handle .gnu.warning.SYMBOL sections how we would want them to work?