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: [gold patch 1/3] Support for incremental linking: write incremental inputs, symtab, relocs


>> + ? ? ?// Get the addend.
>> + ? ? ?typename elfcpp::Elf_types<size>::Elf_Swxword addend;
>> + ? ? ?if (sh_type == elfcpp::SHT_RELA)
>> + ? ? addend =
>> + ? ? ? ? Reloc_types<sh_type, size, big_endian>::get_reloc_addend(&reloc);
>> + ? ? ?else
>> + ? ? ? ?{
>> + ? ? ? ? ?// FIXME: Get the addend for SHT_REL.
>> + ? ? ? ? ?addend = 0;
>> + ? ? ? ?}
>
> Why does the value of the addend matter for a SHT_REL section?

Because the original addend will have been overwritten by the result
of the relocation during the previous link. Hmmm, maybe it could be
recovered because we know the original value of the symbol. I'll have
to think about that -- I think that would require more target-specific
knowledge than it would take to just fetch the original addend here.

-cary


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