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]

Re: [PATCH, gas] PC-relative fx_offset calculation


On Fri, Mar 1, 2013 at 6:02 AM, Chung-Lin Tang <cltang@codesourcery.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
patch.

Perhaps the code that is calling frag_more needs to set dot_value.

Ian


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