This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH, gas] PC-relative fx_offset calculation
- From: Ian Lance Taylor <iant at google dot com>
- To: Chung-Lin Tang <cltang at codesourcery dot com>
- Cc: Binutils <binutils at sourceware dot org>, nickc at redhat dot com
- Date: Fri, 1 Mar 2013 06:30:53 -0800
- Subject: Re: [PATCH, gas] PC-relative fx_offset calculation
- References: <5130B50D.firstname.lastname@example.org>
On Fri, Mar 1, 2013 at 6:02 AM, Chung-Lin Tang <email@example.com> wrote:
> Hi, this patch corrects the PC-relative case in write.c:fixup_segment()
> where the location of the fix seems to incorrectly use fx_dot_value +
> fx_frag->fr_address, rather than fx_where + fx_frag->fr_address.
When making this sort of change to gas internals, it's important to
test a range of targets to see whether they break or not.
The fx_dot_value field was introduced here:
http://sourceware.org/ml/binutils/2002-09/msg00359.html . You should
go look at the test case in that thread and see what happens with your
Perhaps the code that is calling frag_more needs to set dot_value.