[PATCH] MIPS/ld: Calculate DT_RELSZ correctly.
David Daney
ddaney@avtrex.com
Thu May 26 22:24:00 GMT 2005
Richard Sandiford wrote:
> David Daney <ddaney@avtrex.com> writes:
>
>> * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
>> calculation of DT_RELSZ to occur after all dynamic relocations
>> are created.
>
>
> Couldn't you just move the entire loop?
>
Other DT_* values are set based on the state of the mips_got_info
pointers before the dynamic relocations for the non-primary gots are
generated. If the entire loop were moved, then I could not prove to my
self that the proper values would be generated.
Specifically I was concerned about DT_MIPS_HIPAGENO and DT_MIPS_LOCAL_GOTNO.
To make a long story short: I did what I know is safe but possibly
sub-optimal. Instead of Possibly optimal and possibly safe.
David Daney.
More information about the Binutils
mailing list