This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: gold patch RFC: fix address size of DW_FORM_ref_addr
- From: "Ian Lance Taylor via binutils" <binutils at sourceware dot org>
- To: Cary Coutant <ccoutant at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Tue, 21 Nov 2017 06:24:48 -0800
- Subject: Re: gold patch RFC: fix address size of DW_FORM_ref_addr
- Authentication-results: sourceware.org; auth=none
- References: <CAKOQZ8yXwDzus0sex9zs+Nz58TZdKw8VfGEOo8FowqwHDwMsPQ@mail.gmail.com> <CAJimCsFEd+2ogeETvoTLpTZCu8sYy17KrnxvZbi-63Y=qbDuFQ@mail.gmail.com> <CAKOQZ8wbwtJtHSVcJC-ueqBi-Na+TgjDrqkn8yyX=19t42-3kQ@mail.gmail.com>
- Reply-to: Ian Lance Taylor <iant at google dot com>
I'd like to backport this patch to the 2.28 and 2.29 release branches,
but now that we are using git I find that I don't know how to do that.
I thought there would be a branch for the release, but according to
`git branch --list` there is not. There is only a tag. What is the
current binutils process for backporting a patch to the release
branch? Thanks.
Ian
On Mon, Nov 20, 2017 at 1:02 PM, Ian Lance Taylor <iant@google.com> wrote:
> On Sun, Nov 19, 2017 at 5:56 PM, Cary Coutant <ccoutant@gmail.com> wrote:
>>> 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.
>>
>> To be accurate: DWARF v3 predates gold, so it's not that gold wasn't
>> updated, it's just that it was wrong in the first place.
>>
>> Yes, that looks correct, but I'd prefer to do it with a
>> Dwarf_info_reader::ref_addr_size() method instead.
>>
>> Fix DWARF reader to use correct size for DW_FORM_ref_addr.
>>
>> 2017-11-19 Ian Lance Taylor <iant@google.com>
>> Cary Coutant <ccoutant@gmail.com>
>>
>> gold/
>> * gold/dwarf_reader.h (class Dwarf_info_reader): Add ref_addr_size
>> method.
>> * gold/dwarf_reader.cc (Dwarf_die::read_attributes): Use ref_addr_size
>> for DW_FORM_ref_addr_size.
>> (Dwarf_die::skip_attributes): Likewise.
>>
>> Committed.
>>
>> Thanks!
>
> Thanks.
>
> Ian