[MLton-commit] r6700

Matthew Fluet fluet at mlton.org
Mon Aug 18 10:49:46 PDT 2008


.hidden directive only valid for ELF
----------------------------------------------------------------------

U   mlton/trunk/mlton/codegen/amd64-codegen/amd64.fun
U   mlton/trunk/mlton/codegen/x86-codegen/x86.fun

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

Modified: mlton/trunk/mlton/codegen/amd64-codegen/amd64.fun
===================================================================
--- mlton/trunk/mlton/codegen/amd64-codegen/amd64.fun	2008-08-11 23:11:23 UTC (rev 6699)
+++ mlton/trunk/mlton/codegen/amd64-codegen/amd64.fun	2008-08-18 17:49:44 UTC (rev 6700)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -3306,8 +3306,12 @@
       val pseudoop_string = PseudoOp o PseudoOp.string
       val pseudoop_global = PseudoOp o PseudoOp.global
       fun pseudoop_hidden l = 
-         case !Control.Target.os of (* Windows doesn't use .hidden *)
+         (* .hidden is specific to GNU as targetting ELF;
+          * Windows used COFF; Darwin uses Mach-O.
+          *)
+         case !Control.Target.os of
             MLton.Platform.OS.Cygwin => Comment (Label.toString l ^ " is hidden")
+          | MLton.Platform.OS.Darwin => Comment (Label.toString l ^ " is hidden")
           | MLton.Platform.OS.MinGW => Comment (Label.toString l ^ " is hidden")
           | _ => PseudoOp (PseudoOp.hidden l)
       val pseudoop_indirect_symbol = PseudoOp o PseudoOp.indirect_symbol

Modified: mlton/trunk/mlton/codegen/x86-codegen/x86.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86.fun	2008-08-11 23:11:23 UTC (rev 6699)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86.fun	2008-08-18 17:49:44 UTC (rev 6700)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -3503,8 +3503,13 @@
       val pseudoop_string = PseudoOp o PseudoOp.string
       val pseudoop_global = PseudoOp o PseudoOp.global
       fun pseudoop_hidden l =
-         case !Control.Target.os of (* Windows doesn't use .hidden *)
+      fun pseudoop_hidden l = 
+         (* .hidden is specific to GNU as targetting ELF;
+          * Windows used COFF; Darwin uses Mach-O.
+          *)
+         case !Control.Target.os of
             MLton.Platform.OS.Cygwin => Comment (Label.toString l ^ " is hidden")
+          | MLton.Platform.OS.Darwin => Comment (Label.toString l ^ " is hidden")
           | MLton.Platform.OS.MinGW => Comment (Label.toString l ^ " is hidden")
           | _ => PseudoOp (PseudoOp.hidden l)
       val pseudoop_indirect_symbol = PseudoOp o PseudoOp.indirect_symbol




More information about the MLton-commit mailing list