+/* By default emit .eh_frame only, not .debug_frame. */
+#define CFI_EMIT_eh_frame (1 << 0)
+#define CFI_EMIT_debug_frame (1 << 1)
+static int cfi_sections = CFI_EMIT_eh_frame;
+
+static void
+dot_cfi_sections (int ignored ATTRIBUTE_UNUSED)
+{
+ int sections = 0;
+
+ SKIP_WHITESPACE ();
+ if (is_name_beginner (*input_line_pointer))
+ while (1)
+ {
+ char *name, c;
+
+ name = input_line_pointer;
+ c = get_symbol_end ();
+
+ if (strcmp (name, ".eh_frame") == 0)
+ sections |= CFI_EMIT_eh_frame;
+ else if (strcmp (name, ".debug_frame") == 0)
+ sections |= CFI_EMIT_debug_frame;
+ else
+ {
+ *input_line_pointer = c;
+ input_line_pointer = name;
+ break;
+ }
+
+ *input_line_pointer = c;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == ',')
+ {
+ name = input_line_pointer++;
+ SKIP_WHITESPACE ();
+ if (!is_name_beginner (*input_line_pointer))
+ {
+ input_line_pointer = name;
+ break;
+ }
+ }
+ else if (is_name_beginner (*input_line_pointer))
+ break;
+ }
+
+ demand_empty_rest_of_line ();
+ cfi_sections = sections;
+}
+