diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2016-09-29 11:13:46 +0100 |
---|---|---|
committer | Matthew Fortune <matthew.fortune@imgtec.com> | 2016-10-06 12:46:09 +0100 |
commit | 3d3424e9a8d6ad56160b98bf6e223c0346164468 (patch) | |
tree | e66be6d89f5b7ce83276e8a320309ace3a190073 /gas/dw2gencfi.c | |
parent | Make "end" field in feature specs required again. (diff) | |
download | binutils-gdb-3d3424e9a8d6ad56160b98bf6e223c0346164468.tar.gz binutils-gdb-3d3424e9a8d6ad56160b98bf6e223c0346164468.tar.bz2 binutils-gdb-3d3424e9a8d6ad56160b98bf6e223c0346164468.zip |
Refine .cfi_sections check to only consider compact eh_frame
The .cfi_sections directive can be safely used multiple times
with different sections named at any time unless the compact form
of exception handling is requested after CFI information has
been emitted. Only the compact form of CFI information changes
the way in which CFI is generated and therefore cannot be
retrospectively requested after generating CFI information.
gas/
PR gas/20648
* dw2gencfi.c (dot_cfi_sections): Refine the check for
inconsistent .cfi_sections to only consider compact vs non
compact forms.
* testsuite/gas/cfi/cfi-common-9.d: New file.
* testsuite/gas/cfi/cfi-common-9.s: New file.
* testsuite/gas/cfi/cfi.exp: Run new test.
Diffstat (limited to 'gas/dw2gencfi.c')
-rw-r--r-- | gas/dw2gencfi.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/dw2gencfi.c b/gas/dw2gencfi.c index 7294f179964..8eebb51e1c1 100644 --- a/gas/dw2gencfi.c +++ b/gas/dw2gencfi.c @@ -1269,7 +1269,10 @@ dot_cfi_sections (int ignored ATTRIBUTE_UNUSED) } demand_empty_rest_of_line (); - if (cfi_sections_set && cfi_sections != sections) + if (cfi_sections_set + && (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact)) + && (cfi_sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact)) + != (sections & (CFI_EMIT_eh_frame | CFI_EMIT_eh_frame_compact))) as_bad (_("inconsistent uses of .cfi_sections")); cfi_sections = sections; } |