[MLton-commit] r6880

Wesley Terpstra wesley at mlton.org
Mon Sep 22 09:45:06 PDT 2008


Localizing a common symbol (automatically created by gcc in this case) causes
linker errors if it is defined in an unreferenced section. Just whitelist
the symbols gcc automatically creates.

=> i386-linux now passes regression/library


----------------------------------------------------------------------

U   mlton/trunk/bin/static-library

----------------------------------------------------------------------

Modified: mlton/trunk/bin/static-library
===================================================================
--- mlton/trunk/bin/static-library	2008-09-22 12:32:21 UTC (rev 6879)
+++ mlton/trunk/bin/static-library	2008-09-22 16:45:05 UTC (rev 6880)
@@ -48,9 +48,11 @@
       > "$output.globals"
     "${target}objcopy" --globalize-symbols "$output.globals" "$output.o"
   else
-    # ELF systems are all the same...
+    # ELF systems are all the same... localize hidden symbols
+    # Be careful not to localize gcc PIC's common section thunks
     "${target}objdump" -t "$output.o" \
       | grep ' \.hidden ' \
+      | grep -v get_pc_thunk \
       | sed 's/^.* \.hidden //' \
       > "$output.locals"
     "${target}objcopy" --localize-symbols "$output.locals" "$output.o"




More information about the MLton-commit mailing list