Browse Source

Make .eh_frame section read-write on Solaris.

Mike Pall 14 years ago
parent
commit
a58eb604f4
4 changed files with 16 additions and 0 deletions
  1. 4 0
      src/buildvm_x64.h
  2. 4 0
      src/buildvm_x64win.h
  3. 4 0
      src/buildvm_x86.dasc
  4. 4 0
      src/buildvm_x86.h

+ 4 - 0
src/buildvm_x64.h

@@ -3062,7 +3062,11 @@ static void emit_asm_debug(BuildCtx *ctx)
 #endif
 	"\t.align " SZPTR "\n"
 	".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
+#ifdef __solaris__
+    fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
+#else
     fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
+#endif
     fprintf(ctx->fp,
 	".Lframe1:\n"
 	"\t.long .LECIE1-.LSCIE1\n"

+ 4 - 0
src/buildvm_x64win.h

@@ -3060,7 +3060,11 @@ static void emit_asm_debug(BuildCtx *ctx)
 #endif
 	"\t.align " SZPTR "\n"
 	".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
+#ifdef __solaris__
+    fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
+#else
     fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
+#endif
     fprintf(ctx->fp,
 	".Lframe1:\n"
 	"\t.long .LECIE1-.LSCIE1\n"

+ 4 - 0
src/buildvm_x86.dasc

@@ -6025,7 +6025,11 @@ static void emit_asm_debug(BuildCtx *ctx)
 #endif
 	"\t.align " SZPTR "\n"
 	".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
+#ifdef __solaris__
+    fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
+#else
     fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
+#endif
     fprintf(ctx->fp,
 	".Lframe1:\n"
 	"\t.long .LECIE1-.LSCIE1\n"

+ 4 - 0
src/buildvm_x86.h

@@ -3219,7 +3219,11 @@ static void emit_asm_debug(BuildCtx *ctx)
 #endif
 	"\t.align " SZPTR "\n"
 	".LEFDE0:\n\n", (int)ctx->codesz, CFRAME_SIZE);
+#ifdef __solaris__
+    fprintf(ctx->fp, "\t.section .eh_frame,\"aw\",@progbits\n");
+#else
     fprintf(ctx->fp, "\t.section .eh_frame,\"a\",@progbits\n");
+#endif
     fprintf(ctx->fp,
 	".Lframe1:\n"
 	"\t.long .LECIE1-.LSCIE1\n"