aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coff-seh.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-03-25 16:50:10 +0000
committerNick Clifton <nickc@redhat.com>2014-03-25 16:50:10 +0000
commit3c6256d29e2c528880a3cf8df43adf32c7780de5 (patch)
tree7f242618f120a19b6d8e70fc9c0ac2a41c154228 /gas/config/obj-coff-seh.c
parentbc9a55253ed7122cfeee90cd23d964f44c8b0e6a (diff)
downloadfsf-binutils-gdb-3c6256d29e2c528880a3cf8df43adf32c7780de5.zip
fsf-binutils-gdb-3c6256d29e2c528880a3cf8df43adf32c7780de5.tar.gz
fsf-binutils-gdb-3c6256d29e2c528880a3cf8df43adf32c7780de5.tar.bz2
This patch adds a new pseudo-op - .seh_code - to structured exception handling
suite of ops. It changes the current section back to the code section of the current function. This is helpful because the code section may not be .text. * config/obj-coff-seh.c (obj_coff_seh_code): New function - switches the current segment back to the code segment recorded when seh_proc was last invoked. * config/obj-coff-seh.h (SEH_CMDS): Add seh_code.
Diffstat (limited to 'gas/config/obj-coff-seh.c')
-rw-r--r--gas/config/obj-coff-seh.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c
index 88c4a87..ad3fc87 100644
--- a/gas/config/obj-coff-seh.c
+++ b/gas/config/obj-coff-seh.c
@@ -169,6 +169,13 @@ seh_validate_seg (const char *directive)
return 0;
}
+/* Switch back to the code section, whatever that may be. */
+static void
+obj_coff_seh_code (int ignored ATTRIBUTE_UNUSED)
+{
+ subseg_set (seh_ctx_cur->code_seg, 0);
+}
+
static void
switch_xdata (int subseg, segT code_seg)
{