[PATCH] Wrap .subsections_via_symbols directives in #if __APPLE__

Jon Roelofs jonathan at codesourcery.com
Mon May 12 09:27:32 PDT 2014


Move .subsections_via_symbols into definition of DEFINE_COMPILERRT_PRIVATE_FUNCTION.

http://reviews.llvm.org/D3708

Files:
  lib/builtins/arm/restore_vfp_d8_d15_regs.S
  lib/builtins/arm/save_vfp_d8_d15_regs.S
  lib/builtins/arm/switch16.S
  lib/builtins/arm/switch32.S
  lib/builtins/arm/switch8.S
  lib/builtins/arm/switchu8.S
  lib/builtins/assembly.h

Index: lib/builtins/arm/restore_vfp_d8_d15_regs.S
===================================================================
--- lib/builtins/arm/restore_vfp_d8_d15_regs.S
+++ lib/builtins/arm/restore_vfp_d8_d15_regs.S
@@ -31,5 +31,3 @@
 	bx      lr                      // return to prolog
 END_COMPILERRT_FUNCTION(__restore_vfp_d8_d15_regs)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
Index: lib/builtins/arm/save_vfp_d8_d15_regs.S
===================================================================
--- lib/builtins/arm/save_vfp_d8_d15_regs.S
+++ lib/builtins/arm/save_vfp_d8_d15_regs.S
@@ -31,5 +31,3 @@
 	bx      lr                      // return to prolog
 END_COMPILERRT_FUNCTION(__save_vfp_d8_d15_regs)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
Index: lib/builtins/arm/switch16.S
===================================================================
--- lib/builtins/arm/switch16.S
+++ lib/builtins/arm/switch16.S
@@ -42,5 +42,3 @@
 	bx      ip                      // jump to computed label
 END_COMPILERRT_FUNCTION(__switch16)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
Index: lib/builtins/arm/switch32.S
===================================================================
--- lib/builtins/arm/switch32.S
+++ lib/builtins/arm/switch32.S
@@ -42,6 +42,3 @@
 	bx      ip                       // jump to computed label
 END_COMPILERRT_FUNCTION(__switch32)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
-
Index: lib/builtins/arm/switch8.S
===================================================================
--- lib/builtins/arm/switch8.S
+++ lib/builtins/arm/switch8.S
@@ -40,6 +40,3 @@
 	bx      ip                      // jump to computed label
 END_COMPILERRT_FUNCTION(__switch8)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
-
Index: lib/builtins/arm/switchu8.S
===================================================================
--- lib/builtins/arm/switchu8.S
+++ lib/builtins/arm/switchu8.S
@@ -40,6 +40,3 @@
 	bx      ip                      // jump to computed label
 END_COMPILERRT_FUNCTION(__switchu8)
 
-	// tell linker it can break up file at label boundaries
-	.subsections_via_symbols
-
Index: lib/builtins/assembly.h
===================================================================
--- lib/builtins/assembly.h
+++ lib/builtins/assembly.h
@@ -25,6 +25,7 @@
 #if defined(__APPLE__)
 #define HIDDEN_DIRECTIVE .private_extern
 #define LOCAL_LABEL(name) L_##name
+// tell linker it can break up file at label boundaries
 #define FILE_LEVEL_DIRECTIVE  .subsections_via_symbols
 #define SYMBOL_IS_FUNC(name)
 #else
@@ -103,6 +104,7 @@
   SYMBOL_NAME(name):
 
 #define DEFINE_COMPILERRT_PRIVATE_FUNCTION(name)           \
+  FILE_LEVEL_DIRECTIVE     SEPARATOR                       \
   .globl SYMBOL_NAME(name) SEPARATOR                       \
   SYMBOL_IS_FUNC(SYMBOL_NAME(name)) SEPARATOR              \
   HIDDEN_DIRECTIVE SYMBOL_NAME(name) SEPARATOR             \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3708.9318.patch
Type: text/x-patch
Size: 3092 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140512/a140d483/attachment.bin>


More information about the llvm-commits mailing list