aboutsummaryrefslogtreecommitdiff
path: root/gas/dw2gencfi.h
diff options
context:
space:
mode:
authorJojo R <rjiejie@linux.alibaba.com>2022-07-14 00:28:09 +0800
committerJojo R <rjiejie@linux.alibaba.com>2022-11-04 10:30:18 +0800
commit853ba67882805f415c9816ca13d738295cf54f48 (patch)
treea6b9c55e2d4d7a40c4c904e395a84d3d4cbef98b /gas/dw2gencfi.h
parenta494349e806417d4dc7d217500225e515a777811 (diff)
downloadbinutils-853ba67882805f415c9816ca13d738295cf54f48.zip
binutils-853ba67882805f415c9816ca13d738295cf54f48.tar.gz
binutils-853ba67882805f415c9816ca13d738295cf54f48.tar.bz2
Support multiple .eh_frame sections
This patch is based on MULTIPLE_FRAME_SECTIONS and EH_FRAME_LINKONCE, it allows backend to enable this feature and use '--gc-sections' simply. * gas/dw2gencfi.h (TARGET_MULTIPLE_EH_FRAME_SECTIONS): New. (MULTIPLE_FRAME_SECTIONS): Add TARGET_MULTIPLE_EH_FRAME_SECTIONS. * gas/dw2gencfi.c (EH_FRAME_LINKONCE): Add TARGET_MULTIPLE_EH_FRAME_SECTIONS. (is_now_linkonce_segment): Likewise. (get_cfi_seg): Create relocation info between .eh_frame.* and .text.* section. * bfd/elf-bfd.h (elf_backend_can_make_multiple_eh_frame): New. * bfd/elfxx-target.h (elf_backend_can_make_multiple_eh_frame): Likewise. * bfd/elflink.c (_bfd_elf_default_action_discarded): Add checking for elf_backend_can_make_multiple_eh_frame.
Diffstat (limited to 'gas/dw2gencfi.h')
-rw-r--r--gas/dw2gencfi.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/gas/dw2gencfi.h b/gas/dw2gencfi.h
index d570cdb..0f5ae77 100644
--- a/gas/dw2gencfi.h
+++ b/gas/dw2gencfi.h
@@ -66,7 +66,12 @@ extern void cfi_add_CFA_restore_state (void);
#define SUPPORT_COMPACT_EH 0
#endif
-#define MULTIPLE_FRAME_SECTIONS (SUPPORT_FRAME_LINKONCE || SUPPORT_COMPACT_EH)
+#ifndef TARGET_MULTIPLE_EH_FRAME_SECTIONS
+#define TARGET_MULTIPLE_EH_FRAME_SECTIONS 0
+#endif
+
+#define MULTIPLE_FRAME_SECTIONS (SUPPORT_FRAME_LINKONCE || SUPPORT_COMPACT_EH \
+ || TARGET_MULTIPLE_EH_FRAME_SECTIONS)
struct cfi_insn_data
{