[PATCH, RFC 2/9] gas: dw2gencfi: use all_cfi_sections instead of cfi_sections
Indu Bhagat
indu.bhagat@oracle.com
Wed Sep 20 23:03:54 GMT 2023
The code in dw2gencfi.c was checking variable cfi_sections and
all_cfi_sections seemingly randomly. Accessing all_cfi_sections seems
to the correct variable to access.
The data in cfi_sections has already been propagated to all_cfi_sections
once cfi_dot_startproc () has been called.
gas/
* dw2gencfi.c (dot_cfi_startproc): Use all_cfi_sections
instead.
(dot_cfi_endproc): Likewise.
(dot_cfi_fde_data): Likewise.
---
gas/dw2gencfi.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c
index cbfee0a0169..5fcfb373935 100644
--- a/gas/dw2gencfi.c
+++ b/gas/dw2gencfi.c
@@ -1316,7 +1316,7 @@ dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED)
if (!simple)
tc_cfi_frame_initial_instructions ();
- if ((cfi_sections & CFI_EMIT_target) != 0)
+ if ((all_cfi_sections & CFI_EMIT_target) != 0)
tc_cfi_startproc ();
}
@@ -1336,7 +1336,7 @@ dot_cfi_endproc (int ignored ATTRIBUTE_UNUSED)
demand_empty_rest_of_line ();
- if ((cfi_sections & CFI_EMIT_target) != 0)
+ if ((all_cfi_sections & CFI_EMIT_target) != 0)
tc_cfi_endproc (last_fde);
}
@@ -1417,8 +1417,8 @@ dot_cfi_fde_data (int ignored ATTRIBUTE_UNUSED)
last_fde = frchain_now->frch_cfi_data->cur_fde_data;
- if ((cfi_sections & CFI_EMIT_target) != 0
- || (cfi_sections & CFI_EMIT_eh_frame_compact) != 0)
+ if ((all_cfi_sections & CFI_EMIT_target) != 0
+ || (all_cfi_sections & CFI_EMIT_eh_frame_compact) != 0)
{
struct cfi_escape_data *head, **tail, *e;
int num_ops = 0;
--
2.41.0
More information about the Binutils
mailing list