This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] MIPS/binutils: microMIPS linker relaxation fixes
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at codesourcery dot com>
- Cc: <binutils at sourceware dot org>, Tristan Gingold <gingold at adacore dot com>
- Date: Tue, 15 Nov 2011 17:00:55 +0000
- Subject: Re: [PATCH] MIPS/binutils: microMIPS linker relaxation fixes
- References: <alpine.DEB.firstname.lastname@example.org> <email@example.com> <alpine.DEB.firstname.lastname@example.org>
"Maciej W. Rozycki" <email@example.com> writes:
> So I have actually given it some more thought and my understanding of the
> ABI remains that while orphaned R_MIPS_LO16 relocations are indeed
> permitted, they still must be preceded by a corresponding R_MIPS_HI16,
> although that is not required to be adjacent. I believe this is only
> permitted to allow cases like you quoted to avoid unnecessary extra code
> to add missing R_MIPS_HI16 relocations.
There are still potential problems though. We deliberately allow things like:
.word X, Y
and foo is allowed to be in a text section. Does your patch ensure that
foo remains 8-byte aligned, even if we relax code earlier in the section?
> Do you have a better idea?
TBH, my inclination is to remove it from trunk too. I imagine
GCC's LTO will catch many of the interesting cases (because then
we assemble the output object's text section at once).