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

Issue with R_MIPS_TLS_GD relocations



Hi,

xulrunner 1.9.1.5-1 is FTBFS'ing on mips/mipsel. I will work around the
binutils issue in 1.9.1.5-2, but the real issue should probably tackled.

The difference with 1.9.1.4 (which built fine) is the addition of a
__thread variable. There are no other TLS variables in the xulrunner
source code.

After trying different things, and then try to see what happens in ld,
it seems that depending on the number of dynamic relocations, the tls
relocations end up being too far offset-wise for ld (more than 1 << 15),
resulting in the error message that can be seen in the buildd logs:
../../staticlib/components/libxpconnect.a(xpcjsruntime.o):/build/buildd/xulrunner-1.9.1.5/js/src/xpconnect/src/xpcjsruntime.cpp:487: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libxpconnect.a(xpcthreadcontext.o):/build/buildd/xulrunner-1.9.1.5/js/src/xpconnect/src/xpcthreadcontext.cpp:493: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libnecko.a(nsSocketTransportService2.o):/build/buildd/xulrunner-1.9.1.5/netwerk/base/src/nsSocketTransportService2.cpp:437: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libnecko.a(nsSocketTransportService2.o):/build/buildd/xulrunner-1.9.1.5/netwerk/base/src/nsSocketTransportService2.cpp:383: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsJSEnvironment.o): In function `DOMGCCallback':
/build/buildd/xulrunner-1.9.1.5/dom/src/base/nsJSEnvironment.cpp:3694: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsDOMScriptObjectFactory.o):/build/buildd/xulrunner-1.9.1.5/dom/src/base/nsDOMScriptObjectFactory.cpp:384: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsDOMThreadService.o):/build/buildd/xulrunner-1.9.1.5/dom/src/threads/nsDOMThreadService.cpp:1153: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsDOMThreadService.o):/build/buildd/xulrunner-1.9.1.5/dom/src/threads/nsDOMThreadService.cpp:687: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsDOMWorkerXHRProxy.o):/build/buildd/xulrunner-1.9.1.5/dom/src/threads/nsDOMWorkerXHRProxy.cpp:901: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
../../staticlib/components/libgklayout.a(nsDOMWorkerXHRProxy.o):/build/buildd/xulrunner-1.9.1.5/dom/src/threads/nsDOMWorkerXHRProxy.cpp:871: relocation truncated to fit: R_MIPS_TLS_GD against `gTLSIsMainThread'
collect2: ld returned 1 exit status

It seems to me there should be a way for the TLS relocations to go under
the 32k limit, but I don't have the time to dive in the binutils code to
see how that could be done.

Please note that removing libgklayout.a from the linker command line
does make it work, as it reduces the number of dynamic relocations,
though it induces other problems.

Does anyone have an idea ?

Mike


Reply to: