tech-toolchain archive

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

Re: ld compat linker warnings considered harmful



On Fri, 18 Sep 2026, Thomas Klausner wrote:

Did this get sorted out? I was unable to figure out what the blazes
the LTO plugin was actually doing.

No, the thread died down and nothing happened.


There's a `--no-copy-dt-needed-entries' flag to negate the effect of the always
turned on `--copy-dt-needed-entries' which, I think, also plays a part in this
warning being generated:

```
qemu$ cat t.c
#include <stdlib.h>
int main() {
        exit(0);
}

qemu$ cc -o t t.c -lroken
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login_getpwclass(); include <login_cap.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_scan(); include <pwd.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility loginx(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility parsedate(); include <util.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_copyx(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_getpwconf(); include <pwd.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility login(); include <util.h> to generate correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility setusercontext(); include <login_cap.h> for correct reference
ld: /usr/lib/libutil.so.7: warning: warning: reference to compatibility pw_copy(); include <util.h> to generate correct reference

qemu$ cc -Wl,--no-copy-dt-needed-entries -o t t.c -lroken

qemu$
```

-RVP


Home | Main Index | Thread Index | Old Index