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

binNMU of old library packages to fix global _gp symbol



Hi,

I'm about to do lots of binNMUs on mips and mipsel which I thought I
should tell people about :)

Recently freepascal was bootstrapped and uploaded for mips and mipsel,
but unfortunately some of pascal packages don't build on mips. One of
the errors looks like this:
> /usr/bin/ld.bfd: /usr/lib/fpc/3.0.2/units/mips-linux/rtl/cprt0.o: undefined reference to symbol '_gp'
> //usr/lib/mips-linux-gnu/libXau.so.6: error adding symbols: DSO missing from command line

After some investigation, it looks like libXau.so.6 incorrectly exports
the _gp symbol in its dynamic symbol table. This is bad because in the
MIPS ABI this is a special symbol which always refers to the value of
the gp register for the _current_ executable / object. In this case the
_gp value exported from libXau conflicted with the correct value in the
MIPS linker script which confuses ld.

It looks like this is a very old bug which was fixed back in 2012 by
making the _gp symbol hidden.
https://sourceware.org/ml/binutils/2012-08/msg00064.html

This was fixed early in the binutils 2.24 cycle so I think that any
library built with binutils << 2.23.52.20130522-1 (the first 2.24
snapshot uploaded) could be affected. This was uploaded in May 2013.

Note that the effects of this bug do not occur in the vast majority of
executables because recent versions of GCC calculate the value of the gp
register using __gnu_local_gp instead of _gp. This symbol is implemented
internally by the linker so is not affected.

I have done a scan of the archive for libraries which export _gp
globally and these are the broken source packages to be binNMUed.
According to buildd.debian.org, all were last built before June 2013:

attal
blacs-pvm
cdparanoia
coinor-dylp
coinor-vol
dia-newcanvas
distorm64
esound
fsplib
hawknl
hepmc
itsol
jthread
libart-lgpl
libb64
libcgic
libcue
libdssialsacompat
libdvbcsa
libexif-gtk
libfixposix
libg15
libgssglue
libinnodb
libitl
libloki
libmad
liboglappth
libomxalsa
libomxcamera
libomxfbdevsink
libomxmad
libomxvideosrc
libomxvorbis
libprintsys
librcd
libreplaygain
libresample
libshout
libsoil
libspctag
libvformat
libxau
libxmltok
libxss
log4c
lua-cjson
lwipv6
m17n-im-config
madlib
mini18n
mm
oscpack
qtexengine
qwt5
qxmlrpc
raul
rtfilter
snmpkit
sparskit
togl
unicap
xaw3d
xdffileio
ygl

Additionally, I also found some recent packages which incorrectly export
_gp globally. The common factor here is that they all use the GOLD
linker so there's probably a different bug affecting that as well.

qt3d-opensource-src
qtbase-opensource-src
qtcharts-opensource-src
qtconnectivity-opensource-src
qtdeclarative-opensource-src
qtlocation-opensource-src
qtmultimedia-opensource-src
qtquickcontrols2-opensource-src
qtscript-opensource-src
qtsensors-opensource-src
qtserialport-opensource-src
qtsvg-opensource-src
qttools-opensource-src
qtwayland-opensource-src
qtwebchannel-opensource-src
qtwebkit-opensource-src
qtwebsockets-opensource-src
qtx11extras-opensource-src
qtxmlpatterns-opensource-src
webkit2gtk

Thanks,
James

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: