mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 21:41:47 +08:00
Fix dw3gencfi.c so that it will build on targets that do not define BFD_ASSEMBLER.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2003-05-21 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* dw2gencfi.c (cfi_get_label): Use symbol_make for non
|
||||||
|
BFD_ASSEMBLER targets.
|
||||||
|
(cfi_startproc): Change type of saved_seg and cfi_seg to segT.
|
||||||
|
(dot_cfi_endproc): Only call bfd_set_section_flags for targets
|
||||||
|
defining BFD_ASSEMBLER.
|
||||||
|
|
||||||
2003-05-20 Michal Ludvig <mludvig@suse.cz>
|
2003-05-20 Michal Ludvig <mludvig@suse.cz>
|
||||||
|
|
||||||
* as.c (main): Remove tc_cfi_init().
|
* as.c (main): Remove tc_cfi_init().
|
||||||
|
@ -351,22 +351,27 @@ cfi_get_label (void)
|
|||||||
{
|
{
|
||||||
if ((S_GET_VALUE (symbolP) == frag_now_fix ())
|
if ((S_GET_VALUE (symbolP) == frag_now_fix ())
|
||||||
&& (S_GET_SEGMENT (symbolP) == now_seg))
|
&& (S_GET_SEGMENT (symbolP) == now_seg))
|
||||||
{
|
return symbolP;
|
||||||
return symbolP;
|
|
||||||
}
|
|
||||||
snprintf (symname, sizeof (symname), "%s_0x%lx_%u",
|
snprintf (symname, sizeof (symname), "%s_0x%lx_%u",
|
||||||
symbase, (long) frag_now_fix (), i++);
|
symbase, (long) frag_now_fix (), i++);
|
||||||
}
|
}
|
||||||
|
#ifdef BFD_ASSEMBLER
|
||||||
symbolP = (symbolS *) local_symbol_make (symname, now_seg,
|
symbolP = (symbolS *) local_symbol_make (symname, now_seg,
|
||||||
(valueT) frag_now_fix (),
|
(valueT) frag_now_fix (),
|
||||||
frag_now);
|
frag_now);
|
||||||
|
#else
|
||||||
|
symbolP = symbol_make (symname);
|
||||||
|
#endif
|
||||||
return symbolP;
|
return symbolP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dot_cfi_startproc (void)
|
dot_cfi_startproc (void)
|
||||||
{
|
{
|
||||||
|
#ifdef tc_cfi_frame_initial_instructions
|
||||||
const char *simple = "simple";
|
const char *simple = "simple";
|
||||||
|
#endif
|
||||||
|
|
||||||
if (cfi_info)
|
if (cfi_info)
|
||||||
{
|
{
|
||||||
@ -596,7 +601,7 @@ dot_cfi_endproc (void)
|
|||||||
char *cie_buf, *fde_buf, *pbuf, *where;
|
char *cie_buf, *fde_buf, *pbuf, *where;
|
||||||
unsigned long buf_size, cie_size, fde_size, last_cie_offset;
|
unsigned long buf_size, cie_size, fde_size, last_cie_offset;
|
||||||
unsigned long fde_initloc_offset, fde_len_offset, fde_offset;
|
unsigned long fde_initloc_offset, fde_len_offset, fde_offset;
|
||||||
void *saved_seg, *cfi_seg;
|
segT saved_seg, cfi_seg;
|
||||||
expressionS exp;
|
expressionS exp;
|
||||||
|
|
||||||
if (! cfi_info)
|
if (! cfi_info)
|
||||||
@ -609,8 +614,10 @@ dot_cfi_endproc (void)
|
|||||||
/* Open .eh_frame section. */
|
/* Open .eh_frame section. */
|
||||||
saved_seg = now_seg;
|
saved_seg = now_seg;
|
||||||
cfi_seg = subseg_new (".eh_frame", 0);
|
cfi_seg = subseg_new (".eh_frame", 0);
|
||||||
|
#ifdef BFD_ASSEMBLER
|
||||||
bfd_set_section_flags (stdoutput, cfi_seg,
|
bfd_set_section_flags (stdoutput, cfi_seg,
|
||||||
SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA);
|
SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_DATA);
|
||||||
|
#endif
|
||||||
subseg_set (cfi_seg, 0);
|
subseg_set (cfi_seg, 0);
|
||||||
|
|
||||||
/* Build CIE. */
|
/* Build CIE. */
|
||||||
|
Reference in New Issue
Block a user