This is the mail archive of the binutils@sourceware.org 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]

gold patch RFC: fix address size of DW_FORM_ref_addr


In DWARF version 3, DW_FORM_ref_addr changed from using the
compilation unit's address size to using the compilation unit's offset
size.  Although that change happened a while ago, gold was never
updated.  This patch updates gold.

I'm not sure if there is a reasonable way to test this.  GCC never
seems to generate DW_FORM_ref_addr anyhow; it uses DW_FORM_ref4.  I
ran across this using the Go compiler, which does DW_FORM_ref_addr
although it should probably also use DW_FORM_ref4.

Anyhow, Cary, does this patch look correct to you?  Thanks.

Ian

2017-11-17  Ian Lance Taylor  <iant@google.com>

* dwarf_reader.h (class Dwarf_info_reader): Add cu_version
method.
* dwarf_reader.cc (Dwarf_die::read_attributes): On DWARF version 3
and higher, use offset size for DW_FORM_ref_addr.
(Dwarf_die::skip_attributes): Likewise.

Attachment: patch.txt
Description: Text document


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