On Wed, Dec 22, 2021 at 4:49 PM Randy Dunlap <rdunlap@xxxxxxxxxxxxx> wrote: > If lib-y ignores (drops) an object file (usually because it is not used), > the usual way to force it to be included is to add it to obj-y instead > of lib-y (see many examples in lib/Makefile). This is not a problem with lib-y. This is a problem with libs-y. Note the 's'. The former is working as expected. The latter controls whether a directory's lib.a is picked up. For whatever reason, the build system isn't respecting a libs-y declaration added to lib/Makefile like it respects for one added to arch/*/Makefile. > However, this may cause problems with weak symbols. I don't recall it being > used in that scenario. The reason we're using lib-y is so that unused code is pruned in the case that the weak symbol isn't used. IOW, a usual use for lib-y. And it works just fine. As mentioned, the issue is just with libs-y not finding that lib.a file. Jason