diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-12-10 02:36:22 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-12-10 02:36:22 +0000 |
commit | 1fe0c18914957a2f8bd74aef7b2bcf192dbba98b (patch) | |
tree | 5dbebad1f7ff3d82383352544cdb7bf79ef837b9 /compiler-rt/lib/builtins/assembly.h | |
parent | 20962292e86c32f65af218bf74b1bad7074f0e3b (diff) | |
download | bcm5719-llvm-1fe0c18914957a2f8bd74aef7b2bcf192dbba98b.tar.gz bcm5719-llvm-1fe0c18914957a2f8bd74aef7b2bcf192dbba98b.zip |
builtins: cleanup constant data section selection
Each of the object formats use a different directive for selecting the constant
section. Use a macro to avoid the duplication across a number of files. Also
correct a small macro mismatch on the Windows case (HIDDEN_DIRECTIVE -> HIDDEN).
Patch by Vadim Chugunov!
llvm-svn: 223910
Diffstat (limited to 'compiler-rt/lib/builtins/assembly.h')
-rw-r--r-- | compiler-rt/lib/builtins/assembly.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler-rt/lib/builtins/assembly.h b/compiler-rt/lib/builtins/assembly.h index 8688a9bb04c..8bb0ddc106b 100644 --- a/compiler-rt/lib/builtins/assembly.h +++ b/compiler-rt/lib/builtins/assembly.h @@ -28,6 +28,7 @@ // tell linker it can break up file at label boundaries #define FILE_LEVEL_DIRECTIVE .subsections_via_symbols #define SYMBOL_IS_FUNC(name) +#define CONST_SECTION .const #elif defined(__ELF__) @@ -39,10 +40,11 @@ #else #define SYMBOL_IS_FUNC(name) .type name,@function #endif +#define CONST_SECTION .section .rodata #else // !__APPLE__ && !__ELF__ -#define HIDDEN_DIRECTIVE(name) +#define HIDDEN(name) #define LOCAL_LABEL(name) .L ## name #define FILE_LEVEL_DIRECTIVE #define SYMBOL_IS_FUNC(name) \ @@ -50,6 +52,7 @@ .scl 2 SEPARATOR \ .type 32 SEPARATOR \ .endef +#define CONST_SECTION .section .rdata,"rd" #endif |