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: [PATCH][MIPS] Add linker emulation for N64 ABI with forced 32-bit symbols


On Nov 17, 2012, at 11:53 AM, Andrew Pinski wrote:

> 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.

NetBSD only uses a 32-bit load address for N32/O32, N64 loads at 0x140000000.
(One of these days I'm going to move the stack to 0x13ffff0000 for N64).

>> 
>>> 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?

R4000/R4400, MIPS5K, XLR/XLS/XLP, and others.

NetBSD uses -mabicalls so that most symbols are gotten from the GOT so -msym32 doesn't help us that much.


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