Re: ld compat linker warnings considered harmful
Robert Swindells <[email protected]>
| Newsgroups | gmane.os.netbsd.devel.toolchain |
|---|---|
| Message-ID | <[email protected]> |
I wrote: > 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? I don't see anything in llvm+lld that would react to there being some .gnu.warning.SYMBOL sections in object files, so there may not be any other implementations to copy. Do we want to add support for this to pkgsrc lld?