Package: mklibs
Tags: patch

This patch fixes a problem using mklibs for MIPS (discussed at
). The symbol
__gnu_local_gp is defined by the linker for this configuration and so
mklibs should ignore it being undefined. I've only seen the problem for
N32, though it might apply for other ABIs as well. This problem is
entirely independent of the problem of mklibs producing bad binaries for
MIPS (bug 445507), which should probably have been fixed by the binutils
patch .

Index: src/
================================================== =================
--- src/ (revision 55961)
+++ src/ (working copy)
@@ -415,9 +415,11 @@
for obj in objects.values():
for symbol in undefined_symbols(obj):
# Some undefined symbols in libthread_db are defined in
- # the application that uses it.
+ # the application that uses it. __gnu_local_gp is defined
+ # specially by the linker on MIPS.
if (not ("libthread_db\.so", obj)
- and"^ps_", str(symbol)))):
+ and"^ps_", str(symbol)))
+ and str(symbol) != "__gnu_local_gp@Base"):
debug(DEBUG_SPAM, "needed_symbols adding %s, weak: %s" % (symbol, symbol.weak))
needed_symbols[str(symbol)] = symbol

Joseph S. Myers

To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact