On Mon, Feb 26, 2024 at 11:54:50AM +0100, Sumanth Korikkar wrote: > Hi Josh, > > On Fri, Feb 23, 2024 at 03:59:39PM -0800, Josh Poimboeuf wrote: > > On Fri, Feb 23, 2024 at 11:03:13AM +0100, Sumanth Korikkar wrote: > > > In the random config generated by lkp test robot > > > > > > CONFIG_TI_CPSW=m > > > CONFIG_TI_DAVINCI_EMAC=y > > > > > > In drivers/net/ethernet/ti/Makefile: > > > 11 obj-$(CONFIG_TI_DAVINCI_EMAC) += ti_davinci_emac.o > > > 12 ti_davinci_emac-y := davinci_emac.o davinci_cpdma.o > > > ... > > > 16 obj-$(CONFIG_TI_CPSW) += ti_cpsw.o > > > 17 ti_cpsw-y := cpsw.o davinci_cpdma.o cpsw_ale.o cpsw_priv.o cpsw_sl.o cpsw_ethtool.o > > > > > > Here davinci_cpdma.o is used in both obj-$(CONFIG_TI_DAVINCI_EMAC) and > > > obj-$(CONFIG_TI_CPSW), one built as inbuilt and one built as module > > > correspondingly (randconfig) > > > > > > This leads to conflict in Kbuild and results in linking davinci_cpdma.o > > > in vmlinux. > > > * However, davinci_cpdma.o is built with -DMODULE -fPIC. > > > * vmlinux is built with -fno-PIE. > > > > > > This leads to R_390_GOTENT and R_390_GOTDBL entries in vmlinux, which is > > > not expected when building kernel with -fno-PIE. > > > > Nice. > > > > I suppose the current s390 memory model wouldn't support removing > > -fPIC for modules? > > Answer from our toolchain team - Andreas Krebbel: It should be ideally > feasible to build modules without -fPIC on s390. FWIW, I'm looking into this right now. Let's see how things go.