discuss-gnustep
[Top][All Lists]
Advanced

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

Re: libobjc2 AArch64


From: David Chisnall
Subject: Re: libobjc2 AArch64
Date: Tue, 19 Feb 2019 20:17:04 +0000

On 26 Jan 2019, at 20:27, Jordan Schidlowsky <jordan@noodlecake.com> wrote:
> 
> Hey David, Just moving to new thread...
> 
>> Is it fixed in the latest head (including my fix from yesterday)?  If you’re 
>> compiling in a release build, that would explain it.  Note that this code 
>> path should only have been an issue using the 1.x ABI.  If you’re compiling 
>> with -fobjc-runtime=gnustep-2.0 (which should give you 5-10% smaller 
>> binaries, so might be a good idea on Android…) then you won’t have hit that 
>> bug.
> 
> Sorry I should have clarified...  But we're using -fobjc-runtime=gnustep-1.9 
> and obviously the latest 1.9 runtime (with a few mods).   We swapped out the 
> hash implementation for khash ( Not because of performance, but when we ran 
> things with address-sanitizer on device we got some odd corruption faults.  
> Not sure if this was actually a hash table bug, or just something different 
> or weird with android's libc).  We also found some odd memory errors in the 
> ARC weak reference table when we ran things with the sanitizer, so we made a 
> few changes there as well.   Again not really sure if these issues were 
> specific to android or not.  

I found a few bugs in the hash table last year and added some aggressive tests. 
 Hopefully you can revert these changes now...

>> --- a/objc_msgSend.aarch64.S
>> +++ b/objc_msgSend.aarch64.S
>> @@ -79,7 +79,8 @@
>>       ldp    \receiver, x8, [sp], #16
>>       br     x9
>> 6:
>> -       adr    x10, SmallObjectClasses
>> +       adrp    x10, :got:SmallObjectClasses
>> +       ldr     x10, [x10, :got_lo12:SmallObjectClasses]
>>       ldr    x9, [x10, x9, lsl #3]
>>       b      1b
>>       .cfi_endproc
> 
> I will try that.  (I suspect it will).  We will still have a relocation in 
> the 32bit objc_msgSend.arm.S but ya I suspect that would remove the 
> relocation for aarch64.

There’s a thread on the bug tracker about the AArch32 version.  Any help you 
can lend there would be appreciated.

David




reply via email to

[Prev in Thread] Current Thread [Next in Thread]