Compiling DeviceIO

Dell Green Dell.Green at ideaworks.co.uk
Mon Jun 9 16:09:37 UTC 2014


many thanks.



Dell Green
R&D Software Manager
t: (+44)203 668 9870


ideaworks.co.uk
206 Great Portland Street
London W1W 5QJ

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. Any views or opinions presented are solely those of the author and do not necessarily represent those of Ideaworks Limited. Ideaworks (London) Limited, 206 Great Portland Street, London, W1W 5QJ. Company Registration No. 3943726
On 9 Jun 2014, at 16:46, Vladimir Danushevsky <vladimir.danushevsky at oracle.com> wrote:

> Dell,
>
> MOVW/MOVT instructions are not patchable by gcc. You need to use -fPIC.
>
> Vlad
>
> On Jun 9, 2014, at 11:43 AM, Dell Green wrote:
>
>> Hi Bob,
>>
>> Many thanks for your reply.
>>
>> I was trying to cross compile for ARM using  "gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux” linaro toolchain. Have also tried “gcc-linaro-arm-linux-gnueabihf-4.9-2014.05_linux” with same error message
>>
>> Below is the error i get without -fPIC flag
>>
>> linking libdio.so
>> /usr/local/linaro/gcc-linaro-arm-linux-gnueabihf-4.7-2013.04-20130415_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.7.3/../../../../arm-linux-gnueabihf/bin/ld: /home/dell/Documents/DeviceIO/dev/build/obj/jni_i2c.o: relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
>> /home/dell/Documents/DeviceIO/dev/build/obj/jni_i2c.o: could not read symbols: Bad value
>> collect2: error: ld returned 1 exit status
>> make: *** [libdio.so] Error 1
>>
>>
>>
>>
>> Dell Green
>> R&D Software Manager
>> t: (+44)203 668 9870
>> On 9 Jun 2014, at 15:03, Bob Vandette <bob.vandette at oracle.com> wrote:
>>
>>> Dell,
>>>
>>> Are you cross compiling for ARM or building a 32-bit x86 binary?
>>>
>>> I just did an ARM build on a 32 bit Linux box using Linaro 4.7.2 with no problems.
>>>
>>> What's the error message?
>>>
>>> Bob.
>>>
>>>
>>> On Jun 6, 2014, at 6:19 PM, Dell Green <Dell.Green at ideaworks.co.uk> wrote:
>>>
>>>> Hi Guys,
>>>>
>>>> Not sure if I have done something wrong but I had to add -fPIC to your makefile gcc flags to be able to successfully compile it with linaro toolchain 4.7 on Linux 32bit.
>>>>
>>>> Dell Green
>>>> R&D Software Manager
>>>> t: (+44)203 668 9870
>>>>
>>>>
>>>> ideaworks.co.uk
>>>> 206 Great Portland Street
>>>> London W1W 5QJ
>>>>
>>>> This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient or the person responsible for delivering the email to the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. Any views or opinions presented are solely those of the author and do not necessarily represent those of Ideaworks Limited. Ideaworks (London) Limited, 206 Great Portland Street, London, W1W 5QJ. Company Registration No. 3943726
>>>
>>
>



More information about the dio-dev mailing list