This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: x86 gas tweaks.
Alan Modra <amodra@bigpond.net.au> writes:
> On Tue, Jul 09, 2002 at 12:16:21PM +0200, Andreas Jaeger wrote:
>> Alan Modra <amodra@bigpond.net.au> writes:
>>
>> > Committed.
>> >
>> > * config/tc-i386.c (md_pseudo_table <file>): Warning fix.
>> > (BFD_RELOC_8, BFD_RELOC_8_PCREL): Define for non-BFD.
>> > (md_apply_fix3): Formatting. Remove redundant test.
>> > (tc_gen_reloc): Remove redundant code.
>>
>> Why is this redundant?
>> > @@ -4613,11 +4600,11 @@ md_apply_fix3 (fixP, valP, seg)
>> > break;
>> > }
>> > #endif /* defined (OBJ_ELF) || defined (OBJ_MAYBE_ELF) */
>> > - * valP = value;
>> > + *valP = value;
>> > #endif /* defined (BFD_ASSEMBLER) && !defined (TE_Mach) */
>> >
>> > /* Are we finished with this relocation now? */
>> > - if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
>> > + if (fixP->fx_addsy == NULL)
>
> write.c:fixup_segment ensures that pcrel fixups always have a symbol.
>
>> > fixP->fx_done = 1;
>> > #ifdef BFD_ASSEMBLER
>> > else if (use_rela_relocations)
>> > @@ -5136,10 +5123,7 @@ tc_gen_reloc (section, fixp)
>> > if (fixp->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
>> > rel->address = fixp->fx_offset;
>> >
>> > - if (fixp->fx_pcrel)
>> > - rel->addend = fixp->fx_addnumber;
>> > - else
>> > - rel->addend = 0;
>> > + rel->addend = 0;
>> > }
>
> This one is inside !use_rela_relocations, and fx_addnumber is only
> used for x86_64. Don't fear, I'm not breaking x86_64 for you!
Thanks for the explanation - and I do hope that x86-64 is not broken
;-) but with that explanation I think, you're right.
Andreas
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj