1 /* dw2gencfi.c - Support for generating Dwarf2 CFI information.
2 Copyright (C) 2003-2022 Free Software Foundation, Inc.
3 Contributed by Michal Ludvig <mludvig@suse.cz>
5 This file is part of GAS, the GNU Assembler.
7 GAS is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 GAS is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GAS; see the file COPYING. If not, write to the Free
19 Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
23 #include "dw2gencfi.h"
25 #include "dwarf2dbg.h"
27 #ifdef TARGET_USE_CFIPOP
29 /* By default, use difference expressions if DIFF_EXPR_OK is defined. */
30 #ifndef CFI_DIFF_EXPR_OK
32 # define CFI_DIFF_EXPR_OK 1
34 # define CFI_DIFF_EXPR_OK 0
38 #ifndef CFI_DIFF_LSDA_OK
39 #define CFI_DIFF_LSDA_OK CFI_DIFF_EXPR_OK
42 #if CFI_DIFF_EXPR_OK == 1 && CFI_DIFF_LSDA_OK == 0
43 # error "CFI_DIFF_EXPR_OK should imply CFI_DIFF_LSDA_OK"
46 /* We re-use DWARF2_LINE_MIN_INSN_LENGTH for the code alignment field
47 of the CIE. Default to 1 if not otherwise specified. */
48 #ifndef DWARF2_LINE_MIN_INSN_LENGTH
49 #define DWARF2_LINE_MIN_INSN_LENGTH 1
52 /* By default, use 32-bit relocations from .eh_frame into .text. */
53 #ifndef DWARF2_FDE_RELOC_SIZE
54 #define DWARF2_FDE_RELOC_SIZE 4
57 /* By default, use a read-only .eh_frame section. */
58 #ifndef DWARF2_EH_FRAME_READ_ONLY
59 #define DWARF2_EH_FRAME_READ_ONLY SEC_READONLY
62 #ifndef EH_FRAME_ALIGNMENT
63 #define EH_FRAME_ALIGNMENT (bfd_get_arch_size (stdoutput) == 64 ? 3 : 2)
66 #ifndef tc_cfi_frame_initial_instructions
67 #define tc_cfi_frame_initial_instructions() ((void)0)
70 #ifndef tc_cfi_startproc
71 # define tc_cfi_startproc() ((void)0)
74 #ifndef tc_cfi_endproc
75 # define tc_cfi_endproc(fde) ((void) (fde))
78 #define EH_FRAME_LINKONCE (SUPPORT_FRAME_LINKONCE || compact_eh)
81 #define DWARF2_FORMAT(SEC) dwarf2_format_32bit
84 #ifndef DWARF2_ADDR_SIZE
85 #define DWARF2_ADDR_SIZE(bfd) (bfd_arch_bits_per_address (bfd) / 8)
88 #if MULTIPLE_FRAME_SECTIONS
89 #define CUR_SEG(structp) structp->cur_seg
90 #define SET_CUR_SEG(structp, seg) structp->cur_seg = seg
91 #define HANDLED(structp) structp->handled
92 #define SET_HANDLED(structp, val) structp->handled = val
94 #define CUR_SEG(structp) NULL
95 #define SET_CUR_SEG(structp, seg) (void) (0 && seg)
96 #define HANDLED(structp) 0
97 #define SET_HANDLED(structp, val) (void) (0 && val)
100 #ifndef tc_cfi_reloc_for_encoding
101 #define tc_cfi_reloc_for_encoding(e) BFD_RELOC_NONE
104 /* Private segment collection list. */
105 struct dwcfi_seg_list
112 #ifdef SUPPORT_COMPACT_EH
113 static bool compact_eh
;
118 static htab_t dwcfi_hash
;
120 /* Emit a single byte into the current segment. */
125 FRAG_APPEND_1_CHAR (byte
);
128 /* Emit a two-byte word into the current segment. */
133 md_number_to_chars (frag_more (2), data
, 2);
136 /* Emit a four byte word into the current segment. */
141 md_number_to_chars (frag_more (4), data
, 4);
144 /* Emit an unsigned "little-endian base 128" number. */
147 out_uleb128 (addressT value
)
149 output_leb128 (frag_more (sizeof_leb128 (value
, 0)), value
, 0);
152 /* Emit an unsigned "little-endian base 128" number. */
155 out_sleb128 (offsetT value
)
157 output_leb128 (frag_more (sizeof_leb128 (value
, 1)), value
, 1);
161 encoding_size (unsigned char encoding
)
163 if (encoding
== DW_EH_PE_omit
)
165 switch (encoding
& 0x7)
168 return bfd_get_arch_size (stdoutput
) == 64 ? 8 : 4;
169 case DW_EH_PE_udata2
:
171 case DW_EH_PE_udata4
:
173 case DW_EH_PE_udata8
:
180 /* Emit expression EXP in ENCODING. If EMIT_ENCODING is true, first
181 emit a byte containing ENCODING. */
184 emit_expr_encoded (expressionS
*exp
, int encoding
, bool emit_encoding
)
186 unsigned int size
= encoding_size (encoding
);
187 bfd_reloc_code_real_type code
;
189 if (encoding
== DW_EH_PE_omit
)
195 code
= tc_cfi_reloc_for_encoding (encoding
);
196 if (code
!= BFD_RELOC_NONE
)
198 reloc_howto_type
*howto
= bfd_reloc_type_lookup (stdoutput
, code
);
199 char *p
= frag_more (size
);
200 gas_assert (size
== (unsigned) howto
->bitsize
/ 8);
201 md_number_to_chars (p
, 0, size
);
202 fix_new (frag_now
, p
- frag_now
->fr_literal
, size
, exp
->X_add_symbol
,
203 exp
->X_add_number
, howto
->pc_relative
, code
);
205 else if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
208 expressionS tmp
= *exp
;
209 tmp
.X_op
= O_subtract
;
210 tmp
.X_op_symbol
= symbol_temp_new_now ();
211 emit_expr (&tmp
, size
);
212 #elif defined (tc_cfi_emit_pcrel_expr)
213 tc_cfi_emit_pcrel_expr (exp
, size
);
219 emit_expr (exp
, size
);
222 /* Build based on segment the derived .debug_...
223 segment name containing origin segment's postfix name part. */
226 get_debugseg_name (segT seg
, const char *base_name
)
233 return concat (base_name
, NULL
);
235 name
= bfd_section_name (seg
);
237 if (name
== NULL
|| *name
== 0)
238 return concat (base_name
, NULL
);
240 dollar
= strchr (name
, '$');
241 dot
= strchr (name
+ 1, '.');
245 if (!strcmp (base_name
, ".eh_frame_entry")
246 && strcmp (name
, ".text") != 0)
247 return concat (base_name
, ".", name
, NULL
);
255 else if (dot
< dollar
)
260 return concat (base_name
, name
, NULL
);
263 /* Allocate a dwcfi_seg_list structure. */
265 static struct dwcfi_seg_list
*
266 alloc_debugseg_item (segT seg
, int subseg
, char *name
)
268 struct dwcfi_seg_list
*r
;
270 r
= (struct dwcfi_seg_list
*)
271 xmalloc (sizeof (struct dwcfi_seg_list
) + strlen (name
));
279 is_now_linkonce_segment (void)
284 if ((bfd_section_flags (now_seg
)
285 & (SEC_LINK_ONCE
| SEC_LINK_DUPLICATES_DISCARD
286 | SEC_LINK_DUPLICATES_ONE_ONLY
| SEC_LINK_DUPLICATES_SAME_SIZE
287 | SEC_LINK_DUPLICATES_SAME_CONTENTS
)) != 0)
292 /* Generate debug... segment with same linkonce properties
296 make_debug_seg (segT cseg
, char *name
, int sflags
)
298 segT save_seg
= now_seg
;
299 int save_subseg
= now_subseg
;
303 r
= subseg_new (name
, 0);
305 /* Check if code segment is marked as linked once. */
309 flags
= (bfd_section_flags (cseg
)
310 & (SEC_LINK_ONCE
| SEC_LINK_DUPLICATES_DISCARD
311 | SEC_LINK_DUPLICATES_ONE_ONLY
| SEC_LINK_DUPLICATES_SAME_SIZE
312 | SEC_LINK_DUPLICATES_SAME_CONTENTS
));
314 /* Add standard section flags. */
317 /* Apply possibly linked once flags to new generated segment, too. */
318 if (!bfd_set_section_flags (r
, flags
))
319 as_bad (_("bfd_set_section_flags: %s"),
320 bfd_errmsg (bfd_get_error ()));
322 /* Restore to previous segment. */
323 if (save_seg
!= NULL
)
324 subseg_set (save_seg
, save_subseg
);
328 static struct dwcfi_seg_list
*
329 dwcfi_hash_find (char *name
)
331 return (struct dwcfi_seg_list
*) str_hash_find (dwcfi_hash
, name
);
334 static struct dwcfi_seg_list
*
335 dwcfi_hash_find_or_make (segT cseg
, const char *base_name
, int flags
)
337 struct dwcfi_seg_list
*item
;
340 /* Initialize dwcfi_hash once. */
342 dwcfi_hash
= str_htab_create ();
344 name
= get_debugseg_name (cseg
, base_name
);
346 item
= dwcfi_hash_find (name
);
349 item
= alloc_debugseg_item (make_debug_seg (cseg
, name
, flags
), 0, name
);
351 str_hash_insert (dwcfi_hash
, item
->seg_name
, item
, 0);
359 /* ??? Share this with dwarf2cfg.c. */
360 #ifndef TC_DWARF2_EMIT_OFFSET
361 #define TC_DWARF2_EMIT_OFFSET generic_dwarf2_emit_offset
363 /* Create an offset to .dwarf2_*. */
366 generic_dwarf2_emit_offset (symbolS
*symbol
, unsigned int size
)
371 exp
.X_add_symbol
= symbol
;
372 exp
.X_add_number
= 0;
373 emit_expr (&exp
, size
);
377 struct cfi_escape_data
379 struct cfi_escape_data
*next
;
385 struct cie_entry
*next
;
386 #if MULTIPLE_FRAME_SECTIONS
389 symbolS
*start_address
;
390 unsigned int return_column
;
391 unsigned int signal_frame
;
392 unsigned char fde_encoding
;
393 unsigned char per_encoding
;
394 unsigned char lsda_encoding
;
395 expressionS personality
;
396 #ifdef tc_cie_entry_extras
399 struct cfi_insn_data
*first
, *last
;
402 /* List of FDE entries. */
404 struct fde_entry
*all_fde_data
;
405 static struct fde_entry
**last_fde_data
= &all_fde_data
;
407 /* List of CIEs so that they could be reused. */
408 static struct cie_entry
*cie_root
;
410 /* Construct a new FDE structure and add it to the end of the fde list. */
412 static struct fde_entry
*
413 alloc_fde_entry (void)
415 struct fde_entry
*fde
= XCNEW (struct fde_entry
);
417 frchain_now
->frch_cfi_data
= XCNEW (struct frch_cfi_data
);
418 frchain_now
->frch_cfi_data
->cur_fde_data
= fde
;
419 *last_fde_data
= fde
;
420 last_fde_data
= &fde
->next
;
421 SET_CUR_SEG (fde
, is_now_linkonce_segment ());
422 SET_HANDLED (fde
, 0);
423 fde
->last
= &fde
->data
;
424 fde
->return_column
= DWARF2_DEFAULT_RETURN_COLUMN
;
425 fde
->per_encoding
= DW_EH_PE_omit
;
426 fde
->lsda_encoding
= DW_EH_PE_omit
;
427 fde
->eh_header_type
= EH_COMPACT_UNKNOWN
;
428 #ifdef tc_fde_entry_init_extra
429 tc_fde_entry_init_extra (fde
)
435 /* The following functions are available for a backend to construct its
436 own unwind information, usually from legacy unwind directives. */
438 /* Construct a new INSN structure and add it to the end of the insn list
439 for the currently active FDE. */
441 static bool cfi_sections_set
= false;
442 static int cfi_sections
= CFI_EMIT_eh_frame
;
443 int all_cfi_sections
= 0;
444 static struct fde_entry
*last_fde
;
446 static struct cfi_insn_data
*
447 alloc_cfi_insn_data (void)
449 struct cfi_insn_data
*insn
= XCNEW (struct cfi_insn_data
);
450 struct fde_entry
*cur_fde_data
= frchain_now
->frch_cfi_data
->cur_fde_data
;
452 *cur_fde_data
->last
= insn
;
453 cur_fde_data
->last
= &insn
->next
;
454 SET_CUR_SEG (insn
, is_now_linkonce_segment ());
458 /* Construct a new FDE structure that begins at LABEL. */
461 cfi_new_fde (symbolS
*label
)
463 struct fde_entry
*fde
= alloc_fde_entry ();
464 fde
->start_address
= label
;
465 frchain_now
->frch_cfi_data
->last_address
= label
;
468 /* End the currently open FDE. */
471 cfi_end_fde (symbolS
*label
)
473 frchain_now
->frch_cfi_data
->cur_fde_data
->end_address
= label
;
474 free (frchain_now
->frch_cfi_data
);
475 frchain_now
->frch_cfi_data
= NULL
;
478 /* Set the return column for the current FDE. */
481 cfi_set_return_column (unsigned regno
)
483 frchain_now
->frch_cfi_data
->cur_fde_data
->return_column
= regno
;
487 cfi_set_sections (void)
489 frchain_now
->frch_cfi_data
->cur_fde_data
->sections
= all_cfi_sections
;
490 cfi_sections_set
= true;
493 /* Universal functions to store new instructions. */
496 cfi_add_CFA_insn (int insn
)
498 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
500 insn_ptr
->insn
= insn
;
504 cfi_add_CFA_insn_reg (int insn
, unsigned regno
)
506 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
508 insn_ptr
->insn
= insn
;
509 insn_ptr
->u
.r
= regno
;
513 cfi_add_CFA_insn_offset (int insn
, offsetT offset
)
515 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
517 insn_ptr
->insn
= insn
;
518 insn_ptr
->u
.i
= offset
;
522 cfi_add_CFA_insn_reg_reg (int insn
, unsigned reg1
, unsigned reg2
)
524 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
526 insn_ptr
->insn
= insn
;
527 insn_ptr
->u
.rr
.reg1
= reg1
;
528 insn_ptr
->u
.rr
.reg2
= reg2
;
532 cfi_add_CFA_insn_reg_offset (int insn
, unsigned regno
, offsetT offset
)
534 struct cfi_insn_data
*insn_ptr
= alloc_cfi_insn_data ();
536 insn_ptr
->insn
= insn
;
537 insn_ptr
->u
.ri
.reg
= regno
;
538 insn_ptr
->u
.ri
.offset
= offset
;
541 /* Add a CFI insn to advance the PC from the last address to LABEL. */
544 cfi_add_advance_loc (symbolS
*label
)
546 struct cfi_insn_data
*insn
= alloc_cfi_insn_data ();
548 insn
->insn
= DW_CFA_advance_loc
;
549 insn
->u
.ll
.lab1
= frchain_now
->frch_cfi_data
->last_address
;
550 insn
->u
.ll
.lab2
= label
;
552 frchain_now
->frch_cfi_data
->last_address
= label
;
555 /* Add a CFI insn to label the current position in the CFI segment. */
558 cfi_add_label (const char *name
)
560 unsigned int len
= strlen (name
) + 1;
561 struct cfi_insn_data
*insn
= alloc_cfi_insn_data ();
563 insn
->insn
= CFI_label
;
564 obstack_grow (¬es
, name
, len
);
565 insn
->u
.sym_name
= (char *) obstack_finish (¬es
);
568 /* Add a DW_CFA_offset record to the CFI data. */
571 cfi_add_CFA_offset (unsigned regno
, offsetT offset
)
573 unsigned int abs_data_align
;
575 gas_assert (DWARF2_CIE_DATA_ALIGNMENT
!= 0);
576 cfi_add_CFA_insn_reg_offset (DW_CFA_offset
, regno
, offset
);
578 abs_data_align
= (DWARF2_CIE_DATA_ALIGNMENT
< 0
579 ? -DWARF2_CIE_DATA_ALIGNMENT
: DWARF2_CIE_DATA_ALIGNMENT
);
580 if (offset
% abs_data_align
)
581 as_bad (_("register save offset not a multiple of %u"), abs_data_align
);
584 /* Add a DW_CFA_val_offset record to the CFI data. */
587 cfi_add_CFA_val_offset (unsigned regno
, offsetT offset
)
589 unsigned int abs_data_align
;
591 gas_assert (DWARF2_CIE_DATA_ALIGNMENT
!= 0);
592 cfi_add_CFA_insn_reg_offset (DW_CFA_val_offset
, regno
, offset
);
594 abs_data_align
= (DWARF2_CIE_DATA_ALIGNMENT
< 0
595 ? -DWARF2_CIE_DATA_ALIGNMENT
: DWARF2_CIE_DATA_ALIGNMENT
);
596 if (offset
% abs_data_align
)
597 as_bad (_("register save offset not a multiple of %u"), abs_data_align
);
600 /* Add a DW_CFA_def_cfa record to the CFI data. */
603 cfi_add_CFA_def_cfa (unsigned regno
, offsetT offset
)
605 cfi_add_CFA_insn_reg_offset (DW_CFA_def_cfa
, regno
, offset
);
606 frchain_now
->frch_cfi_data
->cur_cfa_offset
= offset
;
609 /* Add a DW_CFA_register record to the CFI data. */
612 cfi_add_CFA_register (unsigned reg1
, unsigned reg2
)
614 cfi_add_CFA_insn_reg_reg (DW_CFA_register
, reg1
, reg2
);
617 /* Add a DW_CFA_def_cfa_register record to the CFI data. */
620 cfi_add_CFA_def_cfa_register (unsigned regno
)
622 cfi_add_CFA_insn_reg (DW_CFA_def_cfa_register
, regno
);
625 /* Add a DW_CFA_def_cfa_offset record to the CFI data. */
628 cfi_add_CFA_def_cfa_offset (offsetT offset
)
630 cfi_add_CFA_insn_offset (DW_CFA_def_cfa_offset
, offset
);
631 frchain_now
->frch_cfi_data
->cur_cfa_offset
= offset
;
635 cfi_add_CFA_restore (unsigned regno
)
637 cfi_add_CFA_insn_reg (DW_CFA_restore
, regno
);
641 cfi_add_CFA_undefined (unsigned regno
)
643 cfi_add_CFA_insn_reg (DW_CFA_undefined
, regno
);
647 cfi_add_CFA_same_value (unsigned regno
)
649 cfi_add_CFA_insn_reg (DW_CFA_same_value
, regno
);
653 cfi_add_CFA_remember_state (void)
655 struct cfa_save_data
*p
;
657 cfi_add_CFA_insn (DW_CFA_remember_state
);
659 p
= XNEW (struct cfa_save_data
);
660 p
->cfa_offset
= frchain_now
->frch_cfi_data
->cur_cfa_offset
;
661 p
->next
= frchain_now
->frch_cfi_data
->cfa_save_stack
;
662 frchain_now
->frch_cfi_data
->cfa_save_stack
= p
;
666 cfi_add_CFA_restore_state (void)
668 struct cfa_save_data
*p
;
670 cfi_add_CFA_insn (DW_CFA_restore_state
);
672 p
= frchain_now
->frch_cfi_data
->cfa_save_stack
;
675 frchain_now
->frch_cfi_data
->cur_cfa_offset
= p
->cfa_offset
;
676 frchain_now
->frch_cfi_data
->cfa_save_stack
= p
->next
;
680 as_bad (_("CFI state restore without previous remember"));
684 /* Parse CFI assembler directives. */
686 static void dot_cfi (int);
687 static void dot_cfi_escape (int);
688 static void dot_cfi_sections (int);
689 static void dot_cfi_startproc (int);
690 static void dot_cfi_endproc (int);
691 static void dot_cfi_fde_data (int);
692 static void dot_cfi_personality (int);
693 static void dot_cfi_personality_id (int);
694 static void dot_cfi_lsda (int);
695 static void dot_cfi_val_encoded_addr (int);
696 static void dot_cfi_inline_lsda (int);
697 static void dot_cfi_label (int);
699 const pseudo_typeS cfi_pseudo_table
[] =
701 { "cfi_sections", dot_cfi_sections
, 0 },
702 { "cfi_startproc", dot_cfi_startproc
, 0 },
703 { "cfi_endproc", dot_cfi_endproc
, 0 },
704 { "cfi_fde_data", dot_cfi_fde_data
, 0 },
705 { "cfi_def_cfa", dot_cfi
, DW_CFA_def_cfa
},
706 { "cfi_def_cfa_register", dot_cfi
, DW_CFA_def_cfa_register
},
707 { "cfi_def_cfa_offset", dot_cfi
, DW_CFA_def_cfa_offset
},
708 { "cfi_adjust_cfa_offset", dot_cfi
, CFI_adjust_cfa_offset
},
709 { "cfi_offset", dot_cfi
, DW_CFA_offset
},
710 { "cfi_rel_offset", dot_cfi
, CFI_rel_offset
},
711 { "cfi_register", dot_cfi
, DW_CFA_register
},
712 { "cfi_return_column", dot_cfi
, CFI_return_column
},
713 { "cfi_restore", dot_cfi
, DW_CFA_restore
},
714 { "cfi_undefined", dot_cfi
, DW_CFA_undefined
},
715 { "cfi_same_value", dot_cfi
, DW_CFA_same_value
},
716 { "cfi_remember_state", dot_cfi
, DW_CFA_remember_state
},
717 { "cfi_restore_state", dot_cfi
, DW_CFA_restore_state
},
718 { "cfi_window_save", dot_cfi
, DW_CFA_GNU_window_save
},
719 { "cfi_negate_ra_state", dot_cfi
, DW_CFA_AARCH64_negate_ra_state
},
720 { "cfi_escape", dot_cfi_escape
, 0 },
721 { "cfi_signal_frame", dot_cfi
, CFI_signal_frame
},
722 { "cfi_personality", dot_cfi_personality
, 0 },
723 { "cfi_personality_id", dot_cfi_personality_id
, 0 },
724 { "cfi_lsda", dot_cfi_lsda
, 0 },
725 { "cfi_val_encoded_addr", dot_cfi_val_encoded_addr
, 0 },
726 { "cfi_inline_lsda", dot_cfi_inline_lsda
, 0 },
727 { "cfi_label", dot_cfi_label
, 0 },
728 { "cfi_val_offset", dot_cfi
, DW_CFA_val_offset
},
733 cfi_parse_separator (void)
736 if (*input_line_pointer
== ',')
737 input_line_pointer
++;
739 as_bad (_("missing separator"));
742 #ifndef tc_parse_to_dw2regnum
744 tc_parse_to_dw2regnum (expressionS
*exp
)
746 # ifdef tc_regname_to_dw2regnum
748 if (is_name_beginner (*input_line_pointer
)
749 || (*input_line_pointer
== '%'
750 && is_name_beginner (*++input_line_pointer
)))
754 c
= get_symbol_name (& name
);
756 exp
->X_op
= O_constant
;
757 exp
->X_add_number
= tc_regname_to_dw2regnum (name
);
759 restore_line_pointer (c
);
763 expression_and_evaluate (exp
);
773 tc_parse_to_dw2regnum (&exp
);
778 regno
= exp
.X_add_number
;
788 as_bad (_("bad register expression"));
796 cfi_parse_const (void)
798 return get_absolute_expression ();
807 if (frchain_now
->frch_cfi_data
== NULL
)
809 as_bad (_("CFI instruction used without previous .cfi_startproc"));
810 ignore_rest_of_line ();
814 /* If the last address was not at the current PC, advance to current. */
815 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
816 || (S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
818 cfi_add_advance_loc (symbol_temp_new_now ());
823 reg1
= cfi_parse_reg ();
824 cfi_parse_separator ();
825 offset
= cfi_parse_const ();
826 cfi_add_CFA_offset (reg1
, offset
);
829 case DW_CFA_val_offset
:
830 reg1
= cfi_parse_reg ();
831 cfi_parse_separator ();
832 offset
= cfi_parse_const ();
833 cfi_add_CFA_val_offset (reg1
, offset
);
837 reg1
= cfi_parse_reg ();
838 cfi_parse_separator ();
839 offset
= cfi_parse_const ();
840 cfi_add_CFA_offset (reg1
,
841 offset
- frchain_now
->frch_cfi_data
->cur_cfa_offset
);
845 reg1
= cfi_parse_reg ();
846 cfi_parse_separator ();
847 offset
= cfi_parse_const ();
848 cfi_add_CFA_def_cfa (reg1
, offset
);
851 case DW_CFA_register
:
852 reg1
= cfi_parse_reg ();
853 cfi_parse_separator ();
854 reg2
= cfi_parse_reg ();
855 cfi_add_CFA_register (reg1
, reg2
);
858 case DW_CFA_def_cfa_register
:
859 reg1
= cfi_parse_reg ();
860 cfi_add_CFA_def_cfa_register (reg1
);
863 case DW_CFA_def_cfa_offset
:
864 offset
= cfi_parse_const ();
865 cfi_add_CFA_def_cfa_offset (offset
);
868 case CFI_adjust_cfa_offset
:
869 offset
= cfi_parse_const ();
870 cfi_add_CFA_def_cfa_offset (frchain_now
->frch_cfi_data
->cur_cfa_offset
877 reg1
= cfi_parse_reg ();
878 cfi_add_CFA_restore (reg1
);
880 if (*input_line_pointer
!= ',')
882 ++input_line_pointer
;
886 case DW_CFA_undefined
:
889 reg1
= cfi_parse_reg ();
890 cfi_add_CFA_undefined (reg1
);
892 if (*input_line_pointer
!= ',')
894 ++input_line_pointer
;
898 case DW_CFA_same_value
:
899 reg1
= cfi_parse_reg ();
900 cfi_add_CFA_same_value (reg1
);
903 case CFI_return_column
:
904 reg1
= cfi_parse_reg ();
905 cfi_set_return_column (reg1
);
908 case DW_CFA_remember_state
:
909 cfi_add_CFA_remember_state ();
912 case DW_CFA_restore_state
:
913 cfi_add_CFA_restore_state ();
916 case DW_CFA_GNU_window_save
:
917 cfi_add_CFA_insn (DW_CFA_GNU_window_save
);
920 case CFI_signal_frame
:
921 frchain_now
->frch_cfi_data
->cur_fde_data
->signal_frame
= 1;
928 demand_empty_rest_of_line ();
932 dot_cfi_escape (int ignored ATTRIBUTE_UNUSED
)
934 struct cfi_escape_data
*head
, **tail
, *e
;
935 struct cfi_insn_data
*insn
;
937 if (frchain_now
->frch_cfi_data
== NULL
)
939 as_bad (_("CFI instruction used without previous .cfi_startproc"));
940 ignore_rest_of_line ();
944 /* If the last address was not at the current PC, advance to current. */
945 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
946 || (S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
948 cfi_add_advance_loc (symbol_temp_new_now ());
953 e
= XNEW (struct cfi_escape_data
);
954 do_parse_cons_expression (&e
->exp
, 1);
958 while (*input_line_pointer
++ == ',');
961 insn
= alloc_cfi_insn_data ();
962 insn
->insn
= CFI_escape
;
965 --input_line_pointer
;
966 demand_empty_rest_of_line ();
970 dot_cfi_personality (int ignored ATTRIBUTE_UNUSED
)
972 struct fde_entry
*fde
;
975 if (frchain_now
->frch_cfi_data
== NULL
)
977 as_bad (_("CFI instruction used without previous .cfi_startproc"));
978 ignore_rest_of_line ();
982 fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
983 encoding
= cfi_parse_const ();
984 if (encoding
== DW_EH_PE_omit
)
986 demand_empty_rest_of_line ();
987 fde
->per_encoding
= encoding
;
991 if ((encoding
& 0xff) != encoding
992 || ((((encoding
& 0x70) != 0
993 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
994 && (encoding
& 0x70) != DW_EH_PE_pcrel
997 /* leb128 can be handled, but does something actually need it? */
998 || (encoding
& 7) == DW_EH_PE_uleb128
999 || (encoding
& 7) > DW_EH_PE_udata8
)
1000 && tc_cfi_reloc_for_encoding (encoding
) == BFD_RELOC_NONE
))
1002 as_bad (_("invalid or unsupported encoding in .cfi_personality"));
1003 ignore_rest_of_line ();
1007 if (*input_line_pointer
++ != ',')
1009 as_bad (_(".cfi_personality requires encoding and symbol arguments"));
1010 ignore_rest_of_line ();
1014 expression_and_evaluate (&fde
->personality
);
1015 switch (fde
->personality
.X_op
)
1020 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
1021 encoding
= DW_EH_PE_omit
;
1024 encoding
= DW_EH_PE_omit
;
1028 fde
->per_encoding
= encoding
;
1030 if (encoding
== DW_EH_PE_omit
)
1032 as_bad (_("wrong second argument to .cfi_personality"));
1033 ignore_rest_of_line ();
1037 demand_empty_rest_of_line ();
1041 dot_cfi_lsda (int ignored ATTRIBUTE_UNUSED
)
1043 struct fde_entry
*fde
;
1046 if (frchain_now
->frch_cfi_data
== NULL
)
1048 as_bad (_("CFI instruction used without previous .cfi_startproc"));
1049 ignore_rest_of_line ();
1053 fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
1054 encoding
= cfi_parse_const ();
1055 if (encoding
== DW_EH_PE_omit
)
1057 demand_empty_rest_of_line ();
1058 fde
->lsda_encoding
= encoding
;
1062 if ((encoding
& 0xff) != encoding
1063 || ((((encoding
& 0x70) != 0
1064 #if CFI_DIFF_LSDA_OK || defined tc_cfi_emit_pcrel_expr
1065 && (encoding
& 0x70) != DW_EH_PE_pcrel
1068 /* leb128 can be handled, but does something actually need it? */
1069 || (encoding
& 7) == DW_EH_PE_uleb128
1070 || (encoding
& 7) > DW_EH_PE_udata8
)
1071 && tc_cfi_reloc_for_encoding (encoding
) == BFD_RELOC_NONE
))
1073 as_bad (_("invalid or unsupported encoding in .cfi_lsda"));
1074 ignore_rest_of_line ();
1078 if (*input_line_pointer
++ != ',')
1080 as_bad (_(".cfi_lsda requires encoding and symbol arguments"));
1081 ignore_rest_of_line ();
1085 fde
->lsda_encoding
= encoding
;
1087 expression_and_evaluate (&fde
->lsda
);
1088 switch (fde
->lsda
.X_op
)
1093 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
1094 encoding
= DW_EH_PE_omit
;
1097 encoding
= DW_EH_PE_omit
;
1101 fde
->lsda_encoding
= encoding
;
1103 if (encoding
== DW_EH_PE_omit
)
1105 as_bad (_("wrong second argument to .cfi_lsda"));
1106 ignore_rest_of_line ();
1110 demand_empty_rest_of_line ();
1114 dot_cfi_val_encoded_addr (int ignored ATTRIBUTE_UNUSED
)
1116 struct cfi_insn_data
*insn_ptr
;
1119 if (frchain_now
->frch_cfi_data
== NULL
)
1121 as_bad (_("CFI instruction used without previous .cfi_startproc"));
1122 ignore_rest_of_line ();
1126 /* If the last address was not at the current PC, advance to current. */
1127 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
1128 || (S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
1129 != frag_now_fix ()))
1130 cfi_add_advance_loc (symbol_temp_new_now ());
1132 insn_ptr
= alloc_cfi_insn_data ();
1133 insn_ptr
->insn
= CFI_val_encoded_addr
;
1135 insn_ptr
->u
.ea
.reg
= cfi_parse_reg ();
1137 cfi_parse_separator ();
1138 encoding
= cfi_parse_const ();
1139 if ((encoding
& 0xff) != encoding
1140 || ((encoding
& 0x70) != 0
1141 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
1142 && (encoding
& 0x70) != DW_EH_PE_pcrel
1145 /* leb128 can be handled, but does something actually need it? */
1146 || (encoding
& 7) == DW_EH_PE_uleb128
1147 || (encoding
& 7) > DW_EH_PE_udata8
)
1149 as_bad (_("invalid or unsupported encoding in .cfi_lsda"));
1150 encoding
= DW_EH_PE_omit
;
1153 cfi_parse_separator ();
1154 expression_and_evaluate (&insn_ptr
->u
.ea
.exp
);
1155 switch (insn_ptr
->u
.ea
.exp
.X_op
)
1160 if ((encoding
& 0x70) != DW_EH_PE_pcrel
)
1164 encoding
= DW_EH_PE_omit
;
1168 insn_ptr
->u
.ea
.encoding
= encoding
;
1169 if (encoding
== DW_EH_PE_omit
)
1171 as_bad (_("wrong third argument to .cfi_val_encoded_addr"));
1172 ignore_rest_of_line ();
1176 demand_empty_rest_of_line ();
1180 dot_cfi_label (int ignored ATTRIBUTE_UNUSED
)
1184 if (frchain_now
->frch_cfi_data
== NULL
)
1186 as_bad (_("CFI instruction used without previous .cfi_startproc"));
1187 ignore_rest_of_line ();
1191 name
= read_symbol_name ();
1195 /* If the last address was not at the current PC, advance to current. */
1196 if (symbol_get_frag (frchain_now
->frch_cfi_data
->last_address
) != frag_now
1197 || (S_GET_VALUE (frchain_now
->frch_cfi_data
->last_address
)
1198 != frag_now_fix ()))
1199 cfi_add_advance_loc (symbol_temp_new_now ());
1201 cfi_add_label (name
);
1204 demand_empty_rest_of_line ();
1208 dot_cfi_sections (int ignored ATTRIBUTE_UNUSED
)
1213 if (is_name_beginner (*input_line_pointer
) || *input_line_pointer
== '"')
1219 saved_ilp
= input_line_pointer
;
1220 c
= get_symbol_name (& name
);
1222 if (startswith (name
, ".eh_frame")
1224 sections
|= CFI_EMIT_eh_frame
;
1225 else if (startswith (name
, ".debug_frame"))
1226 sections
|= CFI_EMIT_debug_frame
;
1227 #if SUPPORT_COMPACT_EH
1228 else if (startswith (name
, ".eh_frame_entry"))
1231 sections
|= CFI_EMIT_eh_frame_compact
;
1234 #ifdef tc_cfi_section_name
1235 else if (strcmp (name
, tc_cfi_section_name
) == 0)
1236 sections
|= CFI_EMIT_target
;
1240 *input_line_pointer
= c
;
1241 input_line_pointer
= saved_ilp
;
1245 *input_line_pointer
= c
;
1246 SKIP_WHITESPACE_AFTER_NAME ();
1247 if (*input_line_pointer
== ',')
1249 name
= input_line_pointer
++;
1251 if (!is_name_beginner (*input_line_pointer
)
1252 && *input_line_pointer
!= '"')
1254 input_line_pointer
= name
;
1258 else if (is_name_beginner (*input_line_pointer
)
1259 || *input_line_pointer
== '"')
1263 demand_empty_rest_of_line ();
1264 if (cfi_sections_set
1265 && (sections
& (CFI_EMIT_eh_frame
| CFI_EMIT_eh_frame_compact
))
1266 && ((cfi_sections
& (CFI_EMIT_eh_frame
| CFI_EMIT_eh_frame_compact
))
1267 != (sections
& (CFI_EMIT_eh_frame
| CFI_EMIT_eh_frame_compact
))))
1268 as_bad (_("inconsistent uses of .cfi_sections"));
1269 cfi_sections
= sections
;
1273 dot_cfi_startproc (int ignored ATTRIBUTE_UNUSED
)
1277 if (frchain_now
->frch_cfi_data
!= NULL
)
1279 as_bad (_("previous CFI entry not closed (missing .cfi_endproc)"));
1280 ignore_rest_of_line ();
1284 cfi_new_fde (symbol_temp_new_now ());
1287 if (is_name_beginner (*input_line_pointer
) || *input_line_pointer
== '"')
1289 char * saved_ilp
= input_line_pointer
;
1292 c
= get_symbol_name (& name
);
1294 if (strcmp (name
, "simple") == 0)
1297 restore_line_pointer (c
);
1300 input_line_pointer
= saved_ilp
;
1302 demand_empty_rest_of_line ();
1304 cfi_sections_set
= true;
1305 all_cfi_sections
|= cfi_sections
;
1306 cfi_set_sections ();
1307 frchain_now
->frch_cfi_data
->cur_cfa_offset
= 0;
1309 tc_cfi_frame_initial_instructions ();
1311 if ((cfi_sections
& CFI_EMIT_target
) != 0)
1312 tc_cfi_startproc ();
1316 dot_cfi_endproc (int ignored ATTRIBUTE_UNUSED
)
1318 if (frchain_now
->frch_cfi_data
== NULL
)
1320 as_bad (_(".cfi_endproc without corresponding .cfi_startproc"));
1321 ignore_rest_of_line ();
1325 last_fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
1327 cfi_end_fde (symbol_temp_new_now ());
1329 demand_empty_rest_of_line ();
1331 cfi_sections_set
= true;
1332 if ((cfi_sections
& CFI_EMIT_target
) != 0)
1333 tc_cfi_endproc (last_fde
);
1337 get_cfi_seg (segT cseg
, const char *base
, flagword flags
, int align
)
1339 /* Exclude .debug_frame sections for Compact EH. */
1340 if (SUPPORT_FRAME_LINKONCE
|| ((flags
& SEC_DEBUGGING
) == 0 && compact_eh
))
1342 struct dwcfi_seg_list
*l
;
1344 l
= dwcfi_hash_find_or_make (cseg
, base
, flags
);
1347 subseg_set (cseg
, l
->subseg
);
1351 cseg
= subseg_new (base
, 0);
1352 bfd_set_section_flags (cseg
, flags
);
1354 record_alignment (cseg
, align
);
1358 #if SUPPORT_COMPACT_EH
1360 dot_cfi_personality_id (int ignored ATTRIBUTE_UNUSED
)
1362 struct fde_entry
*fde
;
1364 if (frchain_now
->frch_cfi_data
== NULL
)
1366 as_bad (_("CFI instruction used without previous .cfi_startproc"));
1367 ignore_rest_of_line ();
1371 fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
1372 fde
->personality_id
= cfi_parse_const ();
1373 demand_empty_rest_of_line ();
1375 if (fde
->personality_id
== 0 || fde
->personality_id
> 3)
1377 as_bad (_("wrong argument to .cfi_personality_id"));
1383 dot_cfi_fde_data (int ignored ATTRIBUTE_UNUSED
)
1385 if (frchain_now
->frch_cfi_data
== NULL
)
1387 as_bad (_(".cfi_fde_data without corresponding .cfi_startproc"));
1388 ignore_rest_of_line ();
1392 last_fde
= frchain_now
->frch_cfi_data
->cur_fde_data
;
1394 cfi_sections_set
= true;
1395 if ((cfi_sections
& CFI_EMIT_target
) != 0
1396 || (cfi_sections
& CFI_EMIT_eh_frame_compact
) != 0)
1398 struct cfi_escape_data
*head
, **tail
, *e
;
1402 if (!is_it_end_of_statement ())
1407 e
= XNEW (struct cfi_escape_data
);
1408 do_parse_cons_expression (&e
->exp
, 1);
1413 while (*input_line_pointer
++ == ',');
1414 --input_line_pointer
;
1418 if (last_fde
->lsda_encoding
!= DW_EH_PE_omit
)
1419 last_fde
->eh_header_type
= EH_COMPACT_HAS_LSDA
;
1420 else if (num_ops
<= 3 && last_fde
->per_encoding
== DW_EH_PE_omit
)
1421 last_fde
->eh_header_type
= EH_COMPACT_INLINE
;
1423 last_fde
->eh_header_type
= EH_COMPACT_OUTLINE
;
1425 if (last_fde
->eh_header_type
== EH_COMPACT_INLINE
)
1428 last_fde
->eh_data_size
= num_ops
;
1429 last_fde
->eh_data
= XNEWVEC (bfd_byte
, num_ops
);
1435 last_fde
->eh_data
[num_ops
++] = e
->exp
.X_add_number
;
1438 if (last_fde
->eh_header_type
== EH_COMPACT_INLINE
)
1440 last_fde
->eh_data
[num_ops
++] = tc_compact_eh_opcode_stop
;
1443 demand_empty_rest_of_line ();
1446 /* Function to emit the compact unwinding opcodes stored in the
1447 fde's eh_data field. The end of the opcode data will be
1448 padded to the value in align. */
1451 output_compact_unwind_data (struct fde_entry
*fde
, int align
)
1453 int data_size
= fde
->eh_data_size
+ 2;
1458 fde
->eh_loc
= symbol_temp_new_now ();
1461 if (fde
->personality_id
!= 0)
1462 *p
= fde
->personality_id
;
1463 else if (fde
->per_encoding
!= DW_EH_PE_omit
)
1466 emit_expr_encoded (&fde
->personality
, fde
->per_encoding
, false);
1467 data_size
+= encoding_size (fde
->per_encoding
);
1472 amask
= (1 << align
) - 1;
1473 align_padding
= ((data_size
+ amask
) & ~amask
) - data_size
;
1475 p
= frag_more (fde
->eh_data_size
+ 1 + align_padding
);
1476 memcpy (p
, fde
->eh_data
, fde
->eh_data_size
);
1477 p
+= fde
->eh_data_size
;
1479 while (align_padding
-- > 0)
1480 *(p
++) = tc_compact_eh_opcode_pad
;
1482 *(p
++) = tc_compact_eh_opcode_stop
;
1483 fde
->eh_header_type
= EH_COMPACT_OUTLINE_DONE
;
1486 /* Handle the .cfi_inline_lsda directive. */
1488 dot_cfi_inline_lsda (int ignored ATTRIBUTE_UNUSED
)
1492 long max_alignment
= 28;
1496 as_bad (_("unexpected .cfi_inline_lsda"));
1497 ignore_rest_of_line ();
1501 if ((last_fde
->sections
& CFI_EMIT_eh_frame_compact
) == 0)
1503 as_bad (_(".cfi_inline_lsda not valid for this frame"));
1504 ignore_rest_of_line ();
1508 if (last_fde
->eh_header_type
!= EH_COMPACT_UNKNOWN
1509 && last_fde
->eh_header_type
!= EH_COMPACT_HAS_LSDA
)
1511 as_bad (_(".cfi_inline_lsda seen for frame without .cfi_lsda"));
1512 ignore_rest_of_line ();
1516 #ifdef md_flush_pending_output
1517 md_flush_pending_output ();
1520 align
= get_absolute_expression ();
1521 if (align
> max_alignment
)
1523 align
= max_alignment
;
1524 as_bad (_("Alignment too large: %d. assumed."), align
);
1528 as_warn (_("Alignment negative: 0 assumed."));
1532 demand_empty_rest_of_line ();
1533 ccseg
= CUR_SEG (last_fde
);
1535 /* Open .gnu_extab section. */
1536 get_cfi_seg (ccseg
, ".gnu_extab",
1537 (SEC_ALLOC
| SEC_LOAD
| SEC_DATA
1538 | DWARF2_EH_FRAME_READ_ONLY
),
1541 frag_align (align
, 0, 0);
1542 record_alignment (now_seg
, align
);
1543 if (last_fde
->eh_header_type
== EH_COMPACT_HAS_LSDA
)
1544 output_compact_unwind_data (last_fde
, align
);
1550 #else /* !SUPPORT_COMPACT_EH */
1552 dot_cfi_inline_lsda (int ignored ATTRIBUTE_UNUSED
)
1554 as_bad (_(".cfi_inline_lsda is not supported for this target"));
1555 ignore_rest_of_line ();
1559 dot_cfi_fde_data (int ignored ATTRIBUTE_UNUSED
)
1561 as_bad (_(".cfi_fde_data is not supported for this target"));
1562 ignore_rest_of_line ();
1566 dot_cfi_personality_id (int ignored ATTRIBUTE_UNUSED
)
1568 as_bad (_(".cfi_personality_id is not supported for this target"));
1569 ignore_rest_of_line ();
1574 output_cfi_insn (struct cfi_insn_data
*insn
)
1581 case DW_CFA_advance_loc
:
1583 symbolS
*from
= insn
->u
.ll
.lab1
;
1584 symbolS
*to
= insn
->u
.ll
.lab2
;
1586 if (symbol_get_frag (to
) == symbol_get_frag (from
))
1588 addressT delta
= S_GET_VALUE (to
) - S_GET_VALUE (from
);
1589 addressT scaled
= delta
/ DWARF2_LINE_MIN_INSN_LENGTH
;
1593 else if (scaled
<= 0x3F)
1594 out_one (DW_CFA_advance_loc
+ scaled
);
1595 else if (scaled
<= 0xFF)
1597 out_one (DW_CFA_advance_loc1
);
1600 else if (scaled
<= 0xFFFF)
1602 out_one (DW_CFA_advance_loc2
);
1607 out_one (DW_CFA_advance_loc4
);
1615 exp
.X_op
= O_subtract
;
1616 exp
.X_add_symbol
= to
;
1617 exp
.X_op_symbol
= from
;
1618 exp
.X_add_number
= 0;
1620 /* The code in ehopt.c expects that one byte of the encoding
1621 is already allocated to the frag. This comes from the way
1622 that it scans the .eh_frame section looking first for the
1623 .byte DW_CFA_advance_loc4. Call frag_grow with the sum of
1624 room needed by frag_more and frag_var to preallocate space
1625 ensuring that the DW_CFA_advance_loc4 is in the fixed part
1626 of the rs_cfa frag, so that the relax machinery can remove
1627 the advance_loc should it advance by zero. */
1629 *frag_more (1) = DW_CFA_advance_loc4
;
1631 frag_var (rs_cfa
, 4, 0, DWARF2_LINE_MIN_INSN_LENGTH
<< 3,
1632 make_expr_symbol (&exp
), frag_now_fix () - 1,
1638 case DW_CFA_def_cfa
:
1639 offset
= insn
->u
.ri
.offset
;
1642 out_one (DW_CFA_def_cfa_sf
);
1643 out_uleb128 (insn
->u
.ri
.reg
);
1644 out_sleb128 (offset
/ DWARF2_CIE_DATA_ALIGNMENT
);
1648 out_one (DW_CFA_def_cfa
);
1649 out_uleb128 (insn
->u
.ri
.reg
);
1650 out_uleb128 (offset
);
1654 case DW_CFA_def_cfa_register
:
1655 case DW_CFA_undefined
:
1656 case DW_CFA_same_value
:
1657 out_one (insn
->insn
);
1658 out_uleb128 (insn
->u
.r
);
1661 case DW_CFA_def_cfa_offset
:
1665 out_one (DW_CFA_def_cfa_offset_sf
);
1666 out_sleb128 (offset
/ DWARF2_CIE_DATA_ALIGNMENT
);
1670 out_one (DW_CFA_def_cfa_offset
);
1671 out_uleb128 (offset
);
1675 case DW_CFA_restore
:
1679 out_one (DW_CFA_restore
+ regno
);
1683 out_one (DW_CFA_restore_extended
);
1684 out_uleb128 (regno
);
1689 regno
= insn
->u
.ri
.reg
;
1690 offset
= insn
->u
.ri
.offset
/ DWARF2_CIE_DATA_ALIGNMENT
;
1693 out_one (DW_CFA_offset_extended_sf
);
1694 out_uleb128 (regno
);
1695 out_sleb128 (offset
);
1697 else if (regno
<= 0x3F)
1699 out_one (DW_CFA_offset
+ regno
);
1700 out_uleb128 (offset
);
1704 out_one (DW_CFA_offset_extended
);
1705 out_uleb128 (regno
);
1706 out_uleb128 (offset
);
1710 case DW_CFA_val_offset
:
1711 regno
= insn
->u
.ri
.reg
;
1712 offset
= insn
->u
.ri
.offset
/ DWARF2_CIE_DATA_ALIGNMENT
;
1715 out_one (DW_CFA_val_offset_sf
);
1716 out_uleb128 (regno
);
1717 out_sleb128 (offset
);
1721 out_one (DW_CFA_val_offset
);
1722 out_uleb128 (regno
);
1723 out_uleb128 (offset
);
1727 case DW_CFA_register
:
1728 out_one (DW_CFA_register
);
1729 out_uleb128 (insn
->u
.rr
.reg1
);
1730 out_uleb128 (insn
->u
.rr
.reg2
);
1733 case DW_CFA_remember_state
:
1734 case DW_CFA_restore_state
:
1735 out_one (insn
->insn
);
1738 case DW_CFA_GNU_window_save
:
1739 out_one (DW_CFA_GNU_window_save
);
1744 struct cfi_escape_data
*e
;
1745 for (e
= insn
->u
.esc
; e
; e
= e
->next
)
1746 emit_expr (&e
->exp
, 1);
1750 case CFI_val_encoded_addr
:
1752 unsigned encoding
= insn
->u
.ea
.encoding
;
1755 if (encoding
== DW_EH_PE_omit
)
1757 out_one (DW_CFA_val_expression
);
1758 out_uleb128 (insn
->u
.ea
.reg
);
1760 switch (encoding
& 0x7)
1762 case DW_EH_PE_absptr
:
1763 enc_size
= DWARF2_ADDR_SIZE (stdoutput
);
1765 case DW_EH_PE_udata2
:
1768 case DW_EH_PE_udata4
:
1771 case DW_EH_PE_udata8
:
1778 /* If the user has requested absolute encoding,
1779 then use the smaller DW_OP_addr encoding. */
1780 if (insn
->u
.ea
.encoding
== DW_EH_PE_absptr
)
1782 out_uleb128 (1 + enc_size
);
1783 out_one (DW_OP_addr
);
1787 out_uleb128 (1 + 1 + enc_size
);
1788 out_one (DW_OP_GNU_encoded_addr
);
1791 if ((encoding
& 0x70) == DW_EH_PE_pcrel
)
1793 #if CFI_DIFF_EXPR_OK
1794 insn
->u
.ea
.exp
.X_op
= O_subtract
;
1795 insn
->u
.ea
.exp
.X_op_symbol
= symbol_temp_new_now ();
1796 #elif defined (tc_cfi_emit_pcrel_expr)
1797 tc_cfi_emit_pcrel_expr (&insn
->u
.ea
.exp
, enc_size
);
1804 emit_expr (&insn
->u
.ea
.exp
, enc_size
);
1809 colon (insn
->u
.sym_name
);
1818 output_cie (struct cie_entry
*cie
, bool eh_frame
, int align
)
1820 symbolS
*after_size_address
, *end_address
;
1822 struct cfi_insn_data
*i
;
1823 offsetT augmentation_size
;
1825 enum dwarf2_format fmt
= DWARF2_FORMAT (now_seg
);
1827 cie
->start_address
= symbol_temp_new_now ();
1828 after_size_address
= symbol_temp_make ();
1829 end_address
= symbol_temp_make ();
1831 exp
.X_op
= O_subtract
;
1832 exp
.X_add_symbol
= end_address
;
1833 exp
.X_op_symbol
= after_size_address
;
1834 exp
.X_add_number
= 0;
1836 if (eh_frame
|| fmt
== dwarf2_format_32bit
)
1837 emit_expr (&exp
, 4); /* Length. */
1840 if (fmt
== dwarf2_format_64bit
)
1842 emit_expr (&exp
, 8); /* Length. */
1844 symbol_set_value_now (after_size_address
);
1846 out_four (0); /* CIE id. */
1849 out_four (-1); /* CIE id. */
1850 if (fmt
!= dwarf2_format_32bit
)
1853 out_one (flag_dwarf_cie_version
); /* Version. */
1856 out_one ('z'); /* Augmentation. */
1857 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1859 if (cie
->lsda_encoding
!= DW_EH_PE_omit
)
1862 #ifdef tc_output_cie_extra
1863 tc_output_cie_extra (cie
);
1866 if (cie
->signal_frame
)
1869 if (flag_dwarf_cie_version
>= 4)
1871 /* For now we are assuming a flat address space with 4 or 8 byte
1873 int address_size
= dwarf2_format_32bit
? 4 : 8;
1874 out_one (address_size
); /* Address size. */
1875 out_one (0); /* Segment size. */
1877 out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH
); /* Code alignment. */
1878 out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT
); /* Data alignment. */
1879 if (flag_dwarf_cie_version
== 1) /* Return column. */
1881 if ((cie
->return_column
& 0xff) != cie
->return_column
)
1882 as_bad (_("return column number %d overflows in CIE version 1"),
1883 cie
->return_column
);
1884 out_one (cie
->return_column
);
1887 out_uleb128 (cie
->return_column
);
1890 augmentation_size
= 1 + (cie
->lsda_encoding
!= DW_EH_PE_omit
);
1891 if (cie
->per_encoding
!= DW_EH_PE_omit
)
1892 augmentation_size
+= 1 + encoding_size (cie
->per_encoding
);
1893 out_uleb128 (augmentation_size
); /* Augmentation size. */
1895 emit_expr_encoded (&cie
->personality
, cie
->per_encoding
, true);
1897 if (cie
->lsda_encoding
!= DW_EH_PE_omit
)
1898 out_one (cie
->lsda_encoding
);
1901 switch (DWARF2_FDE_RELOC_SIZE
)
1904 enc
= DW_EH_PE_sdata2
;
1907 enc
= DW_EH_PE_sdata4
;
1910 enc
= DW_EH_PE_sdata8
;
1915 #if CFI_DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
1916 enc
|= DW_EH_PE_pcrel
;
1918 #ifdef DWARF2_FDE_RELOC_ENCODING
1919 /* Allow target to override encoding. */
1920 enc
= DWARF2_FDE_RELOC_ENCODING (enc
);
1922 cie
->fde_encoding
= enc
;
1928 for (i
= cie
->first
; i
!= cie
->last
; i
= i
->next
)
1930 if (CUR_SEG (i
) != CUR_SEG (cie
))
1932 output_cfi_insn (i
);
1936 frag_align (align
, DW_CFA_nop
, 0);
1937 symbol_set_value_now (end_address
);
1941 output_fde (struct fde_entry
*fde
, struct cie_entry
*cie
,
1942 bool eh_frame
, struct cfi_insn_data
*first
,
1945 symbolS
*after_size_address
, *end_address
;
1947 offsetT augmentation_size
;
1948 enum dwarf2_format fmt
= DWARF2_FORMAT (now_seg
);
1949 unsigned int offset_size
;
1950 unsigned int addr_size
;
1952 after_size_address
= symbol_temp_make ();
1953 end_address
= symbol_temp_make ();
1955 exp
.X_op
= O_subtract
;
1956 exp
.X_add_symbol
= end_address
;
1957 exp
.X_op_symbol
= after_size_address
;
1958 exp
.X_add_number
= 0;
1959 if (eh_frame
|| fmt
== dwarf2_format_32bit
)
1963 if (fmt
== dwarf2_format_64bit
)
1967 emit_expr (&exp
, offset_size
); /* Length. */
1968 symbol_set_value_now (after_size_address
);
1972 exp
.X_op
= O_subtract
;
1973 exp
.X_add_symbol
= after_size_address
;
1974 exp
.X_op_symbol
= cie
->start_address
;
1975 exp
.X_add_number
= 0;
1976 emit_expr (&exp
, offset_size
); /* CIE offset. */
1980 TC_DWARF2_EMIT_OFFSET (cie
->start_address
, offset_size
);
1983 exp
.X_op
= O_symbol
;
1986 bfd_reloc_code_real_type code
1987 = tc_cfi_reloc_for_encoding (cie
->fde_encoding
);
1988 addr_size
= DWARF2_FDE_RELOC_SIZE
;
1989 if (code
!= BFD_RELOC_NONE
)
1991 reloc_howto_type
*howto
= bfd_reloc_type_lookup (stdoutput
, code
);
1992 char *p
= frag_more (addr_size
);
1993 gas_assert (addr_size
== (unsigned) howto
->bitsize
/ 8);
1994 md_number_to_chars (p
, 0, addr_size
);
1995 fix_new (frag_now
, p
- frag_now
->fr_literal
, addr_size
,
1996 fde
->start_address
, 0, howto
->pc_relative
, code
);
2000 exp
.X_op
= O_subtract
;
2001 exp
.X_add_number
= 0;
2002 #if CFI_DIFF_EXPR_OK
2003 exp
.X_add_symbol
= fde
->start_address
;
2004 exp
.X_op_symbol
= symbol_temp_new_now ();
2005 emit_expr (&exp
, addr_size
); /* Code offset. */
2007 exp
.X_op
= O_symbol
;
2008 exp
.X_add_symbol
= fde
->start_address
;
2010 #if defined(tc_cfi_emit_pcrel_expr)
2011 tc_cfi_emit_pcrel_expr (&exp
, addr_size
); /* Code offset. */
2013 emit_expr (&exp
, addr_size
); /* Code offset. */
2020 exp
.X_add_number
= 0;
2021 exp
.X_add_symbol
= fde
->start_address
;
2022 addr_size
= DWARF2_ADDR_SIZE (stdoutput
);
2023 emit_expr (&exp
, addr_size
);
2026 exp
.X_op
= O_subtract
;
2027 exp
.X_add_symbol
= fde
->end_address
;
2028 exp
.X_op_symbol
= fde
->start_address
; /* Code length. */
2029 exp
.X_add_number
= 0;
2030 emit_expr (&exp
, addr_size
);
2032 augmentation_size
= encoding_size (fde
->lsda_encoding
);
2034 out_uleb128 (augmentation_size
); /* Augmentation size. */
2036 emit_expr_encoded (&fde
->lsda
, cie
->lsda_encoding
, false);
2038 for (; first
; first
= first
->next
)
2039 if (CUR_SEG (first
) == CUR_SEG (fde
))
2040 output_cfi_insn (first
);
2042 frag_align (align
, DW_CFA_nop
, 0);
2043 symbol_set_value_now (end_address
);
2046 /* Allow these insns to be put in the initial sequence of a CIE.
2047 If J is non-NULL, then compare I and J insns for a match. */
2050 initial_cie_insn (const struct cfi_insn_data
*i
, const struct cfi_insn_data
*j
)
2052 if (j
&& i
->insn
!= j
->insn
)
2057 case DW_CFA_def_cfa
:
2058 case DW_CFA_val_offset
:
2061 if (i
->u
.ri
.reg
!= j
->u
.ri
.reg
)
2063 if (i
->u
.ri
.offset
!= j
->u
.ri
.offset
)
2068 case DW_CFA_register
:
2071 if (i
->u
.rr
.reg1
!= j
->u
.rr
.reg1
)
2073 if (i
->u
.rr
.reg2
!= j
->u
.rr
.reg2
)
2078 case DW_CFA_def_cfa_register
:
2079 case DW_CFA_restore
:
2080 case DW_CFA_undefined
:
2081 case DW_CFA_same_value
:
2084 if (i
->u
.r
!= j
->u
.r
)
2089 case DW_CFA_def_cfa_offset
:
2092 if (i
->u
.i
!= j
->u
.i
)
2103 static struct cie_entry
*
2104 select_cie_for_fde (struct fde_entry
*fde
, bool eh_frame
,
2105 struct cfi_insn_data
**pfirst
, int align
)
2107 struct cfi_insn_data
*i
, *j
;
2108 struct cie_entry
*cie
;
2110 for (cie
= cie_root
; cie
; cie
= cie
->next
)
2112 if (CUR_SEG (cie
) != CUR_SEG (fde
))
2114 #ifdef tc_cie_fde_equivalent_extra
2115 if (!tc_cie_fde_equivalent_extra (cie
, fde
))
2118 if (cie
->return_column
!= fde
->return_column
2119 || cie
->signal_frame
!= fde
->signal_frame
2120 || cie
->per_encoding
!= fde
->per_encoding
2121 || cie
->lsda_encoding
!= fde
->lsda_encoding
)
2123 if (cie
->per_encoding
!= DW_EH_PE_omit
)
2125 if (cie
->personality
.X_op
!= fde
->personality
.X_op
2126 || (cie
->personality
.X_add_number
2127 != fde
->personality
.X_add_number
))
2129 switch (cie
->personality
.X_op
)
2132 if (cie
->personality
.X_unsigned
!= fde
->personality
.X_unsigned
)
2136 if (cie
->personality
.X_add_symbol
2137 != fde
->personality
.X_add_symbol
)
2144 for (i
= cie
->first
, j
= fde
->data
;
2145 i
!= cie
->last
&& j
!= NULL
;
2146 i
= i
->next
, j
= j
->next
)
2148 if (!initial_cie_insn (i
, j
))
2159 cie
= XNEW (struct cie_entry
);
2160 cie
->next
= cie_root
;
2162 SET_CUR_SEG (cie
, CUR_SEG (fde
));
2163 cie
->return_column
= fde
->return_column
;
2164 cie
->signal_frame
= fde
->signal_frame
;
2165 cie
->per_encoding
= fde
->per_encoding
;
2166 cie
->lsda_encoding
= fde
->lsda_encoding
;
2167 cie
->personality
= fde
->personality
;
2168 cie
->first
= fde
->data
;
2169 #ifdef tc_cie_entry_init_extra
2170 tc_cie_entry_init_extra (cie
, fde
)
2173 for (i
= cie
->first
; i
; i
= i
->next
)
2174 if (!initial_cie_insn (i
, NULL
))
2180 output_cie (cie
, eh_frame
, align
);
2185 #ifdef md_reg_eh_frame_to_debug_frame
2187 cfi_change_reg_numbers (struct cfi_insn_data
*insn
, segT ccseg
)
2189 for (; insn
; insn
= insn
->next
)
2191 if (CUR_SEG (insn
) != ccseg
)
2195 case DW_CFA_advance_loc
:
2196 case DW_CFA_def_cfa_offset
:
2197 case DW_CFA_remember_state
:
2198 case DW_CFA_restore_state
:
2199 case DW_CFA_GNU_window_save
:
2204 case DW_CFA_def_cfa
:
2206 insn
->u
.ri
.reg
= md_reg_eh_frame_to_debug_frame (insn
->u
.ri
.reg
);
2209 case DW_CFA_def_cfa_register
:
2210 case DW_CFA_undefined
:
2211 case DW_CFA_same_value
:
2212 case DW_CFA_restore
:
2213 insn
->u
.r
= md_reg_eh_frame_to_debug_frame (insn
->u
.r
);
2216 case DW_CFA_register
:
2217 insn
->u
.rr
.reg1
= md_reg_eh_frame_to_debug_frame (insn
->u
.rr
.reg1
);
2218 insn
->u
.rr
.reg2
= md_reg_eh_frame_to_debug_frame (insn
->u
.rr
.reg2
);
2221 case CFI_val_encoded_addr
:
2222 insn
->u
.ea
.reg
= md_reg_eh_frame_to_debug_frame (insn
->u
.ea
.reg
);
2231 #define cfi_change_reg_numbers(insn, cseg) do { } while (0)
2234 #if SUPPORT_COMPACT_EH
2236 cfi_emit_eh_header (symbolS
*sym
, bfd_vma addend
)
2240 exp
.X_add_number
= addend
;
2241 exp
.X_add_symbol
= sym
;
2242 emit_expr_encoded (&exp
, DW_EH_PE_sdata4
| DW_EH_PE_pcrel
, false);
2246 output_eh_header (struct fde_entry
*fde
)
2251 if (fde
->eh_header_type
== EH_COMPACT_INLINE
)
2256 cfi_emit_eh_header (fde
->start_address
, addend
);
2258 if (fde
->eh_header_type
== EH_COMPACT_INLINE
)
2261 /* Inline entries always use PR1. */
2263 memcpy(p
, fde
->eh_data
, 3);
2267 if (fde
->eh_header_type
== EH_COMPACT_LEGACY
)
2269 else if (fde
->eh_header_type
== EH_COMPACT_OUTLINE
2270 || fde
->eh_header_type
== EH_COMPACT_OUTLINE_DONE
)
2274 cfi_emit_eh_header (fde
->eh_loc
, addend
);
2282 struct cie_entry
*cie
, *cie_next
;
2283 segT cfi_seg
, ccseg
;
2284 struct fde_entry
*fde
;
2285 struct cfi_insn_data
*first
;
2286 int save_flag_traditional_format
, seek_next_seg
;
2288 if (all_fde_data
== 0)
2291 cfi_sections_set
= true;
2292 if ((all_cfi_sections
& CFI_EMIT_eh_frame
) != 0
2293 || (all_cfi_sections
& CFI_EMIT_eh_frame_compact
) != 0)
2295 /* Make sure check_eh_frame doesn't do anything with our output. */
2296 save_flag_traditional_format
= flag_traditional_format
;
2297 flag_traditional_format
= 1;
2299 if (!EH_FRAME_LINKONCE
)
2301 /* Open .eh_frame section. */
2302 cfi_seg
= get_cfi_seg (NULL
, ".eh_frame",
2303 (SEC_ALLOC
| SEC_LOAD
| SEC_DATA
2304 | DWARF2_EH_FRAME_READ_ONLY
),
2305 EH_FRAME_ALIGNMENT
);
2306 #ifdef md_fix_up_eh_frame
2307 md_fix_up_eh_frame (cfi_seg
);
2318 for (cie
= cie_root
; cie
; cie
= cie_next
)
2320 cie_next
= cie
->next
;
2321 free ((void *) cie
);
2325 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2327 if ((fde
->sections
& CFI_EMIT_eh_frame
) == 0
2328 && (fde
->sections
& CFI_EMIT_eh_frame_compact
) == 0)
2331 #if SUPPORT_COMPACT_EH
2332 /* Emit a LEGACY format header if we have processed all
2333 of the .cfi directives without encountering either inline or
2334 out-of-line compact unwinding opcodes. */
2335 if (fde
->eh_header_type
== EH_COMPACT_HAS_LSDA
2336 || fde
->eh_header_type
== EH_COMPACT_UNKNOWN
)
2337 fde
->eh_header_type
= EH_COMPACT_LEGACY
;
2339 if (fde
->eh_header_type
!= EH_COMPACT_LEGACY
)
2342 if (EH_FRAME_LINKONCE
)
2346 if (seek_next_seg
&& CUR_SEG (fde
) != ccseg
)
2353 ccseg
= CUR_SEG (fde
);
2354 /* Open .eh_frame section. */
2355 cfi_seg
= get_cfi_seg (ccseg
, ".eh_frame",
2356 (SEC_ALLOC
| SEC_LOAD
| SEC_DATA
2357 | DWARF2_EH_FRAME_READ_ONLY
),
2358 EH_FRAME_ALIGNMENT
);
2359 #ifdef md_fix_up_eh_frame
2360 md_fix_up_eh_frame (cfi_seg
);
2366 SET_HANDLED (fde
, 1);
2369 if (fde
->end_address
== NULL
)
2371 as_bad (_("open CFI at the end of file; "
2372 "missing .cfi_endproc directive"));
2373 fde
->end_address
= fde
->start_address
;
2376 cie
= select_cie_for_fde (fde
, true, &first
, 2);
2377 fde
->eh_loc
= symbol_temp_new_now ();
2378 output_fde (fde
, cie
, true, first
,
2379 fde
->next
== NULL
? EH_FRAME_ALIGNMENT
: 2);
2382 while (EH_FRAME_LINKONCE
&& seek_next_seg
== 2);
2384 if (EH_FRAME_LINKONCE
)
2385 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2386 SET_HANDLED (fde
, 0);
2388 #if SUPPORT_COMPACT_EH
2391 /* Create remaining out of line table entries. */
2397 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2399 if ((fde
->sections
& CFI_EMIT_eh_frame
) == 0
2400 && (fde
->sections
& CFI_EMIT_eh_frame_compact
) == 0)
2403 if (fde
->eh_header_type
!= EH_COMPACT_OUTLINE
)
2407 if (seek_next_seg
&& CUR_SEG (fde
) != ccseg
)
2414 ccseg
= CUR_SEG (fde
);
2415 /* Open .gnu_extab section. */
2416 get_cfi_seg (ccseg
, ".gnu_extab",
2417 (SEC_ALLOC
| SEC_LOAD
| SEC_DATA
2418 | DWARF2_EH_FRAME_READ_ONLY
),
2422 SET_HANDLED (fde
, 1);
2424 frag_align (1, 0, 0);
2425 record_alignment (now_seg
, 1);
2426 output_compact_unwind_data (fde
, 1);
2429 while (EH_FRAME_LINKONCE
&& seek_next_seg
== 2);
2431 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2432 SET_HANDLED (fde
, 0);
2434 /* Create index table fragments. */
2440 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2442 if ((fde
->sections
& CFI_EMIT_eh_frame
) == 0
2443 && (fde
->sections
& CFI_EMIT_eh_frame_compact
) == 0)
2448 if (seek_next_seg
&& CUR_SEG (fde
) != ccseg
)
2455 ccseg
= CUR_SEG (fde
);
2456 /* Open .eh_frame_entry section. */
2457 cfi_seg
= get_cfi_seg (ccseg
, ".eh_frame_entry",
2458 (SEC_ALLOC
| SEC_LOAD
| SEC_DATA
2459 | DWARF2_EH_FRAME_READ_ONLY
),
2463 SET_HANDLED (fde
, 1);
2465 output_eh_header (fde
);
2468 while (seek_next_seg
== 2);
2470 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2471 SET_HANDLED (fde
, 0);
2473 #endif /* SUPPORT_COMPACT_EH */
2475 flag_traditional_format
= save_flag_traditional_format
;
2478 cfi_sections_set
= true;
2479 if ((all_cfi_sections
& CFI_EMIT_debug_frame
) != 0)
2481 int alignment
= ffs (DWARF2_ADDR_SIZE (stdoutput
)) - 1;
2483 if (!SUPPORT_FRAME_LINKONCE
)
2484 get_cfi_seg (NULL
, ".debug_frame",
2485 SEC_READONLY
| SEC_DEBUGGING
,
2493 for (cie
= cie_root
; cie
; cie
= cie_next
)
2495 cie_next
= cie
->next
;
2496 free ((void *) cie
);
2500 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2502 if ((fde
->sections
& CFI_EMIT_debug_frame
) == 0)
2505 if (SUPPORT_FRAME_LINKONCE
)
2509 if (seek_next_seg
&& CUR_SEG (fde
) != ccseg
)
2516 ccseg
= CUR_SEG (fde
);
2517 /* Open .debug_frame section. */
2518 get_cfi_seg (ccseg
, ".debug_frame",
2519 SEC_READONLY
| SEC_DEBUGGING
,
2523 SET_HANDLED (fde
, 1);
2525 if (fde
->end_address
== NULL
)
2527 as_bad (_("open CFI at the end of file; "
2528 "missing .cfi_endproc directive"));
2529 fde
->end_address
= fde
->start_address
;
2532 fde
->per_encoding
= DW_EH_PE_omit
;
2533 fde
->lsda_encoding
= DW_EH_PE_omit
;
2534 cfi_change_reg_numbers (fde
->data
, ccseg
);
2535 cie
= select_cie_for_fde (fde
, false, &first
, alignment
);
2536 output_fde (fde
, cie
, false, first
, alignment
);
2539 while (SUPPORT_FRAME_LINKONCE
&& seek_next_seg
== 2);
2541 if (SUPPORT_FRAME_LINKONCE
)
2542 for (fde
= all_fde_data
; fde
; fde
= fde
->next
)
2543 SET_HANDLED (fde
, 0);
2547 #else /* TARGET_USE_CFIPOP */
2549 /* Emit an intelligible error message for missing support. */
2552 dot_cfi_dummy (int ignored ATTRIBUTE_UNUSED
)
2554 as_bad (_("CFI is not supported for this target"));
2555 ignore_rest_of_line ();
2558 const pseudo_typeS cfi_pseudo_table
[] =
2560 { "cfi_sections", dot_cfi_dummy
, 0 },
2561 { "cfi_startproc", dot_cfi_dummy
, 0 },
2562 { "cfi_endproc", dot_cfi_dummy
, 0 },
2563 { "cfi_fde_data", dot_cfi_dummy
, 0 },
2564 { "cfi_def_cfa", dot_cfi_dummy
, 0 },
2565 { "cfi_def_cfa_register", dot_cfi_dummy
, 0 },
2566 { "cfi_def_cfa_offset", dot_cfi_dummy
, 0 },
2567 { "cfi_adjust_cfa_offset", dot_cfi_dummy
, 0 },
2568 { "cfi_offset", dot_cfi_dummy
, 0 },
2569 { "cfi_rel_offset", dot_cfi_dummy
, 0 },
2570 { "cfi_register", dot_cfi_dummy
, 0 },
2571 { "cfi_return_column", dot_cfi_dummy
, 0 },
2572 { "cfi_restore", dot_cfi_dummy
, 0 },
2573 { "cfi_undefined", dot_cfi_dummy
, 0 },
2574 { "cfi_same_value", dot_cfi_dummy
, 0 },
2575 { "cfi_remember_state", dot_cfi_dummy
, 0 },
2576 { "cfi_restore_state", dot_cfi_dummy
, 0 },
2577 { "cfi_window_save", dot_cfi_dummy
, 0 },
2578 { "cfi_escape", dot_cfi_dummy
, 0 },
2579 { "cfi_signal_frame", dot_cfi_dummy
, 0 },
2580 { "cfi_personality", dot_cfi_dummy
, 0 },
2581 { "cfi_personality_id", dot_cfi_dummy
, 0 },
2582 { "cfi_lsda", dot_cfi_dummy
, 0 },
2583 { "cfi_val_encoded_addr", dot_cfi_dummy
, 0 },
2584 { "cfi_label", dot_cfi_dummy
, 0 },
2585 { "cfi_inline_lsda", dot_cfi_dummy
, 0 },
2586 { "cfi_val_offset", dot_cfi_dummy
, 0 },
2594 #endif /* TARGET_USE_CFIPOP */