aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/darwin.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2006-03-01 19:12:22 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-03-01 11:12:22 -0800
commitab0ff8041e3f5457ff94126aa7a537a87267f98d (patch)
tree2dea0dfdc85e799468484651f4d9f1fb96a915dd /gcc/config/darwin.c
parent607f460c8b9e032b3fec25313b032bf07788b354 (diff)
downloadgcc-ab0ff8041e3f5457ff94126aa7a537a87267f98d.zip
gcc-ab0ff8041e3f5457ff94126aa7a537a87267f98d.tar.gz
gcc-ab0ff8041e3f5457ff94126aa7a537a87267f98d.tar.bz2
re PR target/26389 (Darwin does not support -fsection-anchors)
2006-03-01 Andrew Pinski <pinskia@physics.uc.edu> PR target/26389 * config/darwin-protos.h (darwin_asm_output_anchor): Declare. * config/darwin-sections.def (cstring_section): Add SECTION_MERGE to the flags. (literal4_section): Likewise. (literal8_section): Likewise. (objc_selector_refs_section): Likewise. (objc_cls_refs_section): Likewise. * config/darwin.c (darwin_asm_output_anchor): New function. * config/darwin.h (TARGET_ASM_OUTPUT_ANCHOR): Define. From-SVN: r111609
Diffstat (limited to 'gcc/config/darwin.c')
-rw-r--r--gcc/config/darwin.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 25fecd8..2ae24a9 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -1479,4 +1479,17 @@ darwin_binds_local_p (tree decl)
return default_binds_local_p_1 (decl, 0);
}
+/* The Darwin's implementation of TARGET_ASM_OUTPUT_ANCHOR. Define the
+ anchor relative to ".", the current section position. We cannot use
+ the default one because ASM_OUTPUT_DEF is wrong for Darwin. */
+
+void
+darwin_asm_output_anchor (rtx symbol)
+{
+ fprintf (asm_out_file, "\t.set\t");
+ assemble_name (asm_out_file, XSTR (symbol, 0));
+ fprintf (asm_out_file, ", . + " HOST_WIDE_INT_PRINT_DEC "\n",
+ SYMBOL_REF_BLOCK_OFFSET (symbol));
+}
+
#include "gt-darwin.h"