Minor coding nitpick in binutils/bfd/elf32-v850.c
Nick Clifton
nickc@redhat.com
Tue May 11 16:27:00 GMT 2004
Hi Bernd,
>What's this?
>
>binutils/bfd/elf32-v850.c: v850_elf_final_link_relocate():
>
> case R_V850_SDA_16_16_SPLIT_OFFSET:
> ...
> value -= sym_sec->output_section->vma;
> value -= (gp - sym_sec->output_section->vma);
>
>
>That's just equivalent to (*)
> value -= gp;
>
>
True. The intention was that the code would show how the adjustments to
"value" were computed. The first line demonstrates "value" being turned
into a section relative offset. The second line demonstrates "value"
then being made into a gp and section relative offset. My assumption
was that the compiler would eliminate the redundancy in the computation
so having it in the sources would not impose any unnecessary overheads
on the linker.
Cheers
Nick
More information about the Binutils
mailing list