gnustep-dev
[Top][All Lists]
Advanced

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

Re: libobjc2 relocation issue in aarch64


From: Jordan Schidlowsky
Subject: Re: libobjc2 relocation issue in aarch64
Date: Wed, 17 Jul 2019 14:42:58 -0600

Yep.  Shared library removes the relocation problem.   There's no real reason 
why I'm static linking libobjc in, I'm fine to move to a shared lib.  Thanks!


> On Jul 17, 2019, at 1:56 PM, David Chisnall <address@hidden> wrote:
> 
> I think the main hint is to use a dynamic library.  Static linking is not 
> well tested on any platform and the assembly code expects a PIC model.  I’m 
> happy to accept patches that improve the static linking experience, but it’s 
> not something that I have any plans to work on personally.
> 
> David
> 
>> On 17 Jul 2019, at 20:43, Jordan Schidlowsky <address@hidden> wrote:
>> 
>> I can't seem to get libobjc2 to link in properly to my android app on 
>> arm64-v8a.  I'm using the latest clang prebuilt by Frederik here: 
>> https://github.com/gnustep/tools-android    
>> 
>> I've tried 3 different linkers, and all report the same 
>> R_AARCH64_ADR_PREL_LO21 issue.  bfd was the only linker to provide any 
>> insight, but it seems like it's related to the SmallObjectClasses symbol.   
>> Output from each linker is below:
>> 
>> gold:
>> libs/libobjc2/objc_msgSend.aarch64.S:97: error: relocation overflow in 
>> R_AARCH64_ADR_PREL_LO21
>> 
>> lld:
>> ld.lld: error: 
>> ../../../../libs/libobjc2/objc_msgSend.aarch64.S:97:(.text+0xD0): relocation 
>> R_AARCH64_ADR_PREL_LO21 out of range: 16077624 is not in [-1048576, 1048575]
>> 
>> bfd:
>> libs/libobjc2/libobjc.a(objc_msgSend.S.o): In function `objc_msgSend_stret': 
>> libs/libobjc2/objc_msgSend.aarch64.S:97:(.text+0xd0): relocation truncated 
>> to fit: R_AARCH64_ADR_PREL_LO21 against symbol `SmallObjectClasses' defined 
>> in COMMON section in libs/libobjc2/libobjc.a(class_table.c.o)
>> 
>> 
>> Any thoughts?
>> -Jordan
> 




reply via email to

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