This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] bfd/elf-eh-frame.c: return address column of CIE


Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Aug 22, 2002 at 09:01:53PM +0100, Nick Clifton wrote:
>> Hi Kaz,
>> 
>>> The DWARF 2 draft says that the return address register column of
>>> CIE of an eh_frame has the unsigned byte type. I've seen also that
>>> gcc puts it as an unsigned byte. So
>>> _bfd_elf_discard_section_eh_frame shouldn't use read_uleb128 when
>>> reading it.
>> 
>> Thanks for spotting it.
>> 
>>> 2002-08-18  Kaz Kojima <kkojima@rr.iij4u.or.jp>
>>> 
>>> 	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
>>> 	byte read when reading the return address register column. 
>> 
>> Approved and applied.
> 
> Unfortunately it is wrong, at least my Dwarf3-draft7-011029.pdf
> says:
> 
> 7.  return_address_register
> 
>    An unsigned LEB128 constant that indicates which column in the rule table represents the
>    return address of the function. Note that this column might not correspond to an actual
>    machine register.
> 
>    In DWARF V2, this field is a ubyte.

I'm just a little confused. It seems that GCC uses DWARF v2 not v3
format about this. gcc/dwarf2out.c (output_call_frame) outputs this
entry like as:

  ...
  dw2_asm_output_data_sleb128 (DWARF_CIE_DATA_ALIGNMENT,
			       "CIE Data Alignment Factor");
  dw2_asm_output_data (1, DWARF_FRAME_RETURN_COLUMN, "CIE RA Column");
  ...

but binutils uses DWARF v3. Does it mean that we should fix gcc?

	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]