[PATCH][MIPS] Add linker emulation for N64 ABI with forced 32-bit symbols

Andrew Pinski pinskia@gmail.com
Sat Nov 17 19:53:00 GMT 2012

On Sat, Nov 17, 2012 at 11:31 AM, Matt Thomas <matt@3am-software.com> wrote:
> On Nov 15, 2012, at 2:08 PM, Richard Sandiford wrote:
>> Huh.  I'm very much against the original change to the n64 TEXT_START_ADDR.
>> See this previous discussion on the topic:
>>    http://sourceware.org/ml/binutils/2008-06/msg00285.html
>> The justification for changing TEXT_START_ADDR from a 32-bit value to a
>> larger value was that it would show users if their code was non-portable,
>> because anything that assumed 32-bit addresses would now fault.  But that
>> seems to me like the tools lecturing to the user.  As I said in that thread,
>> I think users who want to smoke out such portability problems (by making
>> sure that the lower 4GB aren't mapped) should be the ones who need to do
>> something special.
> Gee, should we go back and stop making sure VA 0 is unmapped too?  Sure it helps find NULL pointer dereferences but isn't that the tools lecturing to the user as well?  Having the TEXT_START_ADDR at 5GB doesn't hurt anyone and will errant catch 32-bit deferences instead of allowing possible silent corruption.  Why is that a bad thing?

I think Richard's point is that the major targets which have both 32
and 64bits are now using a load address which is a 32bits address.  So
the issues on the major platforms have an issue already.

>> I think we should simply revert to a 32-bit TEXT_START_ADDR for all
>> n64 emulations.  This time I'm even in a position to approve it :-)
> I strongly disagree.  Just because you can approve it doesn't mean you are right.  If you do make the change, NetBSD will still use the 5GB start address.

So you don't want the speed up from -msym32 for netbsd, that is fine
with me.  Which MIPS64 processors are supported by netbsd again?
Andrew Pinski

More information about the Binutils mailing list