Handle dwarf3 format CIE entries.
This commit is contained in:
parent
4b36307329
commit
0da76f83eb
6 changed files with 49 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-13 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle dwarf3
|
||||||
|
format CIE entries.
|
||||||
|
|
||||||
2004-05-13 Joel Sherrill <joel@oarcorp.com>
|
2004-05-13 Joel Sherrill <joel@oarcorp.com>
|
||||||
|
|
||||||
* config.bfd (or32-*-rtems*): Switch to elf.
|
* config.bfd (or32-*-rtems*): Switch to elf.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* .eh_frame section optimization.
|
/* .eh_frame section optimization.
|
||||||
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
|
Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>.
|
Written by Jakub Jelinek <jakub@redhat.com>.
|
||||||
|
|
||||||
This file is part of BFD, the Binary File Descriptor library.
|
This file is part of BFD, the Binary File Descriptor library.
|
||||||
|
@ -410,7 +410,7 @@ _bfd_elf_discard_section_eh_frame
|
||||||
cie.version = *buf++;
|
cie.version = *buf++;
|
||||||
|
|
||||||
/* Cannot handle unknown versions. */
|
/* Cannot handle unknown versions. */
|
||||||
if (cie.version != 1)
|
if (cie.version != 1 && cie.version != 3)
|
||||||
goto free_no_table;
|
goto free_no_table;
|
||||||
if (strlen (buf) > sizeof (cie.augmentation) - 1)
|
if (strlen (buf) > sizeof (cie.augmentation) - 1)
|
||||||
goto free_no_table;
|
goto free_no_table;
|
||||||
|
@ -434,7 +434,10 @@ _bfd_elf_discard_section_eh_frame
|
||||||
ports this will not matter as the value will be less than 128.
|
ports this will not matter as the value will be less than 128.
|
||||||
For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
|
For the others (eg FRV, SH, MMIX, IA64) they need a fixed GCC
|
||||||
which conforms to the DWARF3 standard. */
|
which conforms to the DWARF3 standard. */
|
||||||
read_uleb128 (cie.ra_column, buf);
|
if (cie.version == 1)
|
||||||
|
cie.ra_column = *buf++;
|
||||||
|
else
|
||||||
|
read_uleb128 (cie.ra_column, buf);
|
||||||
ENSURE_NO_RELOCS (buf);
|
ENSURE_NO_RELOCS (buf);
|
||||||
cie.lsda_encoding = DW_EH_PE_omit;
|
cie.lsda_encoding = DW_EH_PE_omit;
|
||||||
cie.fde_encoding = DW_EH_PE_omit;
|
cie.fde_encoding = DW_EH_PE_omit;
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2004-05-13 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* readelf.c (display_debug_frames): Handle dwarf3 format CIE
|
||||||
|
entries.
|
||||||
|
|
||||||
2004-05-13 Nick Clifton <nickc@redhat.com>
|
2004-05-13 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* po/fr.po: Updated French translation.
|
* po/fr.po: Updated French translation.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* readelf.c -- display contents of an ELF format file
|
/* readelf.c -- display contents of an ELF format file
|
||||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Originally developed by Eric Youngdale <eric@andante.jic.com>
|
Originally developed by Eric Youngdale <eric@andante.jic.com>
|
||||||
Modifications by Nick Clifton <nickc@redhat.com>
|
Modifications by Nick Clifton <nickc@redhat.com>
|
||||||
|
@ -8968,7 +8968,14 @@ display_debug_frames (Elf_Internal_Shdr *section,
|
||||||
{
|
{
|
||||||
fc->code_factor = LEB ();
|
fc->code_factor = LEB ();
|
||||||
fc->data_factor = SLEB ();
|
fc->data_factor = SLEB ();
|
||||||
fc->ra = byte_get (start, 1); start += 1;
|
if (version == 1)
|
||||||
|
{
|
||||||
|
fc->ra = GET (1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fc->ra = LEB ();
|
||||||
|
}
|
||||||
augmentation_data_len = LEB ();
|
augmentation_data_len = LEB ();
|
||||||
augmentation_data = start;
|
augmentation_data = start;
|
||||||
start += augmentation_data_len;
|
start += augmentation_data_len;
|
||||||
|
@ -8978,13 +8985,27 @@ display_debug_frames (Elf_Internal_Shdr *section,
|
||||||
start += addr_size;
|
start += addr_size;
|
||||||
fc->code_factor = LEB ();
|
fc->code_factor = LEB ();
|
||||||
fc->data_factor = SLEB ();
|
fc->data_factor = SLEB ();
|
||||||
fc->ra = byte_get (start, 1); start += 1;
|
if (version == 1)
|
||||||
|
{
|
||||||
|
fc->ra = GET (1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fc->ra = LEB ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fc->code_factor = LEB ();
|
fc->code_factor = LEB ();
|
||||||
fc->data_factor = SLEB ();
|
fc->data_factor = SLEB ();
|
||||||
fc->ra = byte_get (start, 1); start += 1;
|
if (version == 1)
|
||||||
|
{
|
||||||
|
fc->ra = GET (1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fc->ra = LEB ();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cie = fc;
|
cie = fc;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2004-05-13 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
|
* dw2gencfi.c (output_cie): Handle dwarf3 format CIE entries.
|
||||||
|
|
||||||
2004-05-13 Joel Sherrill <joel@oarcorp.com>
|
2004-05-13 Joel Sherrill <joel@oarcorp.com>
|
||||||
|
|
||||||
* configure.in (or32-*-rtems*): Switch to elf.
|
* configure.in (or32-*-rtems*): Switch to elf.
|
||||||
|
|
|
@ -845,7 +845,10 @@ output_cie (struct cie_entry *cie)
|
||||||
out_one (0);
|
out_one (0);
|
||||||
out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH); /* Code alignment */
|
out_uleb128 (DWARF2_LINE_MIN_INSN_LENGTH); /* Code alignment */
|
||||||
out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment */
|
out_sleb128 (DWARF2_CIE_DATA_ALIGNMENT); /* Data alignment */
|
||||||
out_one (cie->return_column); /* Return column */
|
if (DW_CIE_VERSION == 1) /* Return column. */
|
||||||
|
out_one (cie->return_column);
|
||||||
|
else
|
||||||
|
out_uleb128 (cie->return_column);
|
||||||
out_uleb128 (1); /* Augmentation size */
|
out_uleb128 (1); /* Augmentation size */
|
||||||
#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
|
#if defined DIFF_EXPR_OK || defined tc_cfi_emit_pcrel_expr
|
||||||
out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4);
|
out_one (DW_EH_PE_pcrel | DW_EH_PE_sdata4);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue