-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add binutils patch until next gas version is released
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
From d039200a7ee8ac170afbdc3b987af553c07fb6a3 Mon Sep 17 00:00:00 2001 | ||
From: J?r?me Gardou <[email protected]> | ||
Date: Fri, 23 Apr 2021 16:33:47 +0100 | ||
Subject: [PATCH] Allow .seh_pushframe to take an optional [code] parameter | ||
|
||
* config/obj-coff-seh.c (obj_coff_seh_pushframe): Allow an | ||
optional "code" argument. | ||
--- | ||
gas/ChangeLog | 5 +++++ | ||
gas/config/obj-coff-seh.c | 21 ++++++++++++++++++++- | ||
2 files changed, 25 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/gas/ChangeLog b/gas/ChangeLog | ||
index 7fe07770b61..aedc6ea48a9 100644 | ||
--- a/gas/ChangeLog | ||
+++ b/gas/ChangeLog | ||
@@ -1,3 +1,8 @@ | ||
+2021-04-23 Jérôme Gardou <[email protected]> | ||
+ | ||
+ * config/obj-coff-seh.c (obj_coff_seh_pushframe): Allow an | ||
+ optional "code" argument. | ||
+ | ||
2021-04-23 Jan Beulich <[email protected]> | ||
|
||
* config/tc-i386.c (want_disp32): New. | ||
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 | ||
|