From 71a17ca2f0cc4d364e157f00299f77b05fdec263 Mon Sep 17 00:00:00 2001 From: Indu Bhagat Date: Mon, 15 Jan 2024 00:59:35 -0800 Subject: [PATCH] gas: dw2gencfi: use all_cfi_sections instead of cfi_sections 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 01cde827f63..eccfd6470c2 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;