> Date: Mon, 24 Aug 2015 00:30:36 -0700 > From: Philip Guenther <[email protected]> > > On Mon, Aug 10, 2015 at 10:01 AM, Matthieu Herrb <[email protected]> wrote: > > while trying to build a newer xserver 1.17 on loongson, I got the > > folloing ld crash. > > > > Apparently this is already using -fPIC so I don't know how to make > > space for local GOT entries. > > > > Making all in modesetting > > /bin/sh ../../../../libtool --tag=CC --mode=link gcc -std=gnu99 > > -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2 > > -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs > > -Wbad-function-cast -Wold-style-definition -Wdeclaration-after-statement > > -Wunused -Wuninitialized -Wshadow -Wmissing-noreturn > > -Wmissing-format-attribute -Werror=implicit -Werror=nonnull > > -Werror=init-self -Werror=main -Werror=missing-braces > > -Werror=sequence-point -Werror=return-type -Werror=trigraphs > > -Werror=write-strings -Werror=address -Werror=int-to-pointer-cast > > -Werror=pointer-to-int-cast -fno-strict-aliasing -fno-strict-aliasing > > -I/usr/X11R6/include -D_DEFAULT_SOURCE -D_BSD_SOURCE -DHAS_FCHOWN > > -DHAS_STICKY_DIR_BIT -I/usr/X11R6/include/X11/dri > > -I/usr/include/dev/pci/drm -I/usr/X11R6/include/pixman-1 > > -I/usr/X11R6/include/freetype2 -I/usr/xenocara/xserver/include > > -I../../../../include -I/usr/xenocara/xserver/Xext > > -I/usr/xenocara/xserver/composite -I/usr/xenocara/xserver/! da! > ma! > > geext -I/usr/xenocara/xserver/xfixes -I/usr/xenocara/xserver/Xi > > -I/usr/xenocara/xserver/mi -I/usr/xenocara/xserver/miext/sync > > -I/usr/xenocara/xserver/miext/shadow -I/usr/xenocara/xserver/miext/damage > > -I/usr/xenocara/xserver/render -I/usr/xenocara/xserver/randr > > -I/usr/xenocara/xserver/fb -I/usr/xenocara/xserver/dbe > > -I/usr/xenocara/xserver/present -fvisibility=hidden -DHAVE_XORG_CONFIG_H > > -fvisibility=hidden -I/usr/X11R6/include -I/usr/X11R6/include > > -I/usr/include/dev/pci/drm -DXF86PM -I/usr/X11R6/include > > -I/usr/X11R6/include -I/usr/include/dev/pci/drm -Wall -Wpointer-arith > > -Wmissing-declarations -Wformat=2 -Wstrict-prototypes -Wmissing-prototypes > > -Wnested-externs -Wbad-function-cast -Wold-style-definition > > -Wdeclaration-after-statement -Wunused -Wuninitialized -Wshadow > > -Wmissing-noreturn -Wmissing-format-attribute -Werror=implicit > > -Werror=nonnull -Werror=init-self -Werror=main -Werror=missing-braces > > -Werror=sequence-point -Werror=return-type -Werror=trigraphs -Werror=wri! te! > -s! > > trings -Werror=address -Werror=int-to-pointer-cast > > -Werror=pointer-to-int-cast -fno-strict-aliasing -O2 -pipe -Wa,-xgot > > -module -avoid-version -o modesetting_drv.la -rpath > > /usr/X11R6/lib/modules/drivers dri2.lo driver.lo drmmode_display.lo > > dumb_bo.lo present.lo vblank.lo -lm > > libtool: link: gcc -std=gnu99 -shared -fPIC -DPIC -o > > .libs/modesetting_drv.so .libs/dri2.o .libs/driver.o > > .libs/drmmode_display.o .libs/dumb_bo.o .libs/present.o .libs/vblank.o > > -lm -O2 > > /usr/bin/ld: not enough GOT space for local GOT entries > > /usr/bin/ld: BFD 2.17 internal error, aborting at > > /usr/src/gnu/usr.bin/binutils-2.17/bfd/elfxx-mips.c line 7924 in > > _bfd_mips_elf_relocate_section > > > > /usr/bin/ld: Please report this bug. > > If I'm reading the code right, this isn't matter of the GOT being too > large for the ABI, but rather a complaint that ld's internal tracking > of which GOT entries go where is off, such that after determining that > it would need space for N entries in a particular GOT, it then finds > itself trying to insert an N+1'th entry. Somewhere it's failing to > increment the correct counter, or is decrementing it when it > shouldn't...
This seems to be a long-standing issue with mips support in binutils. I briefly looked through the changes in the 2007/2008 timeframe but didn't identify anything committed upstream that might fix this.
