NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-macppc/54953: 5.0 binaries on 9.0_RC2 macppc dumps core in jemalloc(3)



> On Feb 11, 2020, at 1:55 PM, Valery Ushakov <uwe%stderr.spb.ru@localhost> wrote:
> 
> 	/*
> 	 * Initialize the Small Data Area registers.
> 	 * _SDA_BASE is defined in the SVR4 ABI for PPC.
> 	 * _SDA2_BASE is defined in the E[mbedded] ABI for PPC.
> 	 */
> 	__asm(  "lis %r13,_SDA_BASE_@ha;"
> 		"addi %r13,%r13,_SDA_BASE_@l;"
> 		"lis %r2,_SDA2_BASE_@ha;"
> 		"addi %r2,%r2,_SDA2_BASE_@l" );
> 
> But now we use %r2 for TLS!  So malloc() works fine the first few
> times that it's called from the libc init.  Then the old binary entry
> point is called (old crt0) and it overwrites TLS magic in %r2 with
> _SDA2_BASE_.  Next time malloc() is called and checks its TLS stuff,
> the %r2 contains wrong value and pop goes the weasel.

Um, are we no longer adhering to the PPC SVR4 ABI??

-- thorpej



Home | Main Index | Thread Index | Old Index