diff options
author | Jan Beulich <jbeulich@suse.com> | 2024-10-04 09:36:56 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2024-10-04 09:36:56 +0200 |
commit | 833c28eefb87de08bee1a696721d746441d096d6 (patch) | |
tree | 5c0d43932bf6c4f08f8b1fb3c08614bdb6ed00fe | |
parent | c41215350b049439974f304b4e232ec3e73a72a0 (diff) | |
download | gdb-833c28eefb87de08bee1a696721d746441d096d6.zip gdb-833c28eefb87de08bee1a696721d746441d096d6.tar.gz gdb-833c28eefb87de08bee1a696721d746441d096d6.tar.bz2 |
gas/dw2gencfi: correct .sframe section conditional
While originally this was in preparation of a subsequent change making
SUPPORT_FRAME_LINKONCE potentially dependent on a global variable, the
construct appears unlikely to have been correct in the first place: The
variable would have been passed reliably uninitialized when
SUPPORT_FRAME_LINKONCE is build-time true.
While there correct indentation of the parameters passed to
get_cfi_seg().
-rw-r--r-- | gas/dw2gencfi.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index db0261d..ca7605e 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -2498,16 +2498,15 @@ cfi_finish (void) - .sframe in the .cfi_sections directive. */ if (flag_gen_sframe || (all_cfi_sections & CFI_EMIT_sframe) != 0) { - if (support_sframe_p ()) + if (support_sframe_p () && !SUPPORT_FRAME_LINKONCE) { segT sframe_seg; int alignment = ffs (DWARF2_ADDR_SIZE (stdoutput)) - 1; - if (!SUPPORT_FRAME_LINKONCE) - sframe_seg = get_cfi_seg (NULL, ".sframe", - (SEC_ALLOC | SEC_LOAD | SEC_DATA - | DWARF2_EH_FRAME_READ_ONLY), - alignment); + sframe_seg = get_cfi_seg (NULL, ".sframe", + (SEC_ALLOC | SEC_LOAD | SEC_DATA + | DWARF2_EH_FRAME_READ_ONLY), + alignment); output_sframe (sframe_seg); } else |