Re: undefined reference to `_GLOBAL_OFFSET_TABLE_'

From: Nicholas Piggin
Date: Sun Jul 23 2017 - 01:21:47 EST


On Sun, 23 Jul 2017 08:20:30 +0800
kbuild test robot <fengguang.wu@xxxxxxxxx> wrote:

> Hi Nicholas,
>
> FYI, the error/warning still remains.

FYI, I still suspect it is this bug

https://sourceware.org/bugzilla/show_bug.cgi?id=21017

If so, then I'm not sure if it can be worked around in Linux.

Thanks,
Nick


>
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 4b162c530d9c101381500e586fedb1340595a6ff
> commit: 799c43415442414b1032580c47684cb709dfed6d kbuild: thin archives make default for all archs
> date: 3 weeks ago
> config: microblaze-allnoconfig (attached as .config)
> compiler: microblaze-linux-gcc (GCC) 6.2.0
> reproduce:
> wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout 799c43415442414b1032580c47684cb709dfed6d
> # save the attached .config to linux build tree
> make.cross ARCH=microblaze
>
> All errors (new ones prefixed by >>):
>
> mm/slub.o: In function `__slab_free.isra.13':
> >> (.text+0x1038): undefined reference to `_GLOBAL_OFFSET_TABLE_'
> scripts/link-vmlinux.sh: line 93: 56533 Segmentation fault ${LD} ${LDFLAGS} ${LDFLAGS_vmlinux} -o ${2} -T ${lds} ${objects}
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation