forked from reactos/RosBE
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinutils-seh_pushframe-jgardou.patch
More file actions
40 lines (37 loc) · 1.02 KB
/
binutils-seh_pushframe-jgardou.patch
File metadata and controls
40 lines (37 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
diff --git a/gas/config/obj-coff-seh.c b/gas/config/obj-coff-seh.c
index 964fe87e0ac..f907e729bcf 100644
--- a/gas/config/obj-coff-seh.c
+++ b/gas/config/obj-coff-seh.c
@@ -582,12 +582,31 @@ obj_coff_seh_pushreg (int what ATTRIBUTE_UNUSED)
static void
obj_coff_seh_pushframe (int what ATTRIBUTE_UNUSED)
{
+ int code = 0;
+
if (!verify_context_and_target (".seh_pushframe", seh_kind_x64)
|| !seh_validate_seg (".seh_pushframe"))
return;
+
+ SKIP_WHITESPACE();
+
+ if (is_name_beginner (*input_line_pointer))
+ {
+ char* identifier;
+
+ get_symbol_name (&identifier);
+ if (strcmp (identifier, "code") != 0)
+ {
+ as_bad(_("invalid argument \"%s\" for .seh_pushframe. Expected \"code\" or nothing"),
+ identifier);
+ return;
+ }
+ code = 1;
+ }
+
demand_empty_rest_of_line ();
- seh_x64_make_prologue_element (UWOP_PUSH_MACHFRAME, 0, 0);
+ seh_x64_make_prologue_element (UWOP_PUSH_MACHFRAME, code, 0);
}
/* Add a register save-unwind token to current context. */
--
2.27.0