From a58eb604f43d688057ae94f09738863c61a0e5d6 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 11 Jun 2011 15:56:00 +0200 Subject: [PATCH] Make .eh_frame section read-write on Solaris. --- src/buildvm_x64.h | 4 ++++ src/buildvm_x64win.h | 4 ++++ src/buildvm_x86.dasc | 4 ++++ src/buildvm_x86.h | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/buildvm_x64.h b/src/buildvm_x64.h index 4a96493f..6fe46d9f 100644 --- a/src/buildvm_x64.h +++ b/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" diff --git a/src/buildvm_x64win.h b/src/buildvm_x64win.h index 9dbad9a3..fa196086 100644 --- a/src/buildvm_x64win.h +++ b/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" diff --git a/src/buildvm_x86.dasc b/src/buildvm_x86.dasc index 6fde191d..14b47089 100644 --- a/src/buildvm_x86.dasc +++ b/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" diff --git a/src/buildvm_x86.h b/src/buildvm_x86.h index 44f47339..831a00ab 100644 --- a/src/buildvm_x86.h +++ b/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"