Movatterモバイル変換
[0]ホーム
This is the mail archive of thebinutils@sources.redhat.commailing list for thebinutils project.
Re: MIPS patch to correct the size of %neg() fixups
- From: Thiemo Seufer <ica2_ts at csv dot ica dot uni-stuttgart dot de>
- To: binutils at sources dot redhat dot com
- Date: Tue, 10 Jun 2003 22:21:07 +0200
- Subject: Re: MIPS patch to correct the size of %neg() fixups
- References: <wvnd6hl6711.fsf@talisman.cambridge.redhat.com>
Richard Sandiford wrote:> This code:> > foo:> lui$2,%hi(%neg(%gp_rel(foo)))> sub$sp,$sp,28> > causes an internal error:> > /tmp/abort.s:2: Error: internal error: fixup not contained within frag> > gas is creating a separate fixup for the each relocation operator> in the first instruction. The size of the fixup is determined> by the corresponding relocation's howto.> > Problem is, R_MIPS_SUB is a 64-bit relocation, so it gets a 64-bit> fixup. The "sub" macro then forces the start of a new frag, so the> R_MIPS_SUB fixup goes beyond the end of the old frag.> > As I understand it, the relocation field should be determined> by the outermost operator (%hi() in this case) and all three> fixups should use that size.That's probably a too simple approach for the genaral case, since e.g. aR_MIPS_GPREL(sym)R_MIPS_64(null)sequuence is supposed to produce a 64bit addend. AFAICS the relocationfield size in all relocations of a triple should be the largest oneencountered there.Thiemo
[8]ページ先頭