Closed wernerd closed 5 years ago
What if you just move the constants to the .text section? Or even delete the section labels entirely?
I'm not familiar with the AMR64 assembler :-) - I just found the fix (computing the addresses) in some other project and just took it over. Thus I'm not sure what happens if I move the data to the .text section. I do some testing and see what happens.
Have you tried to compile with the flag -fPIC? This should solve the problem.
@dburbani Moving the constants to the .text section worked in my tests. I'll update this part in the upcoming release.
First of all thanks a lot for this code :-)
I ran several tests with the ARM64 assembly code and the results are impressive on my Android 6P device. However, when I tried to use the assembly code in a larger project the linker complained about several relocation problems:
I checked the code and the ARM64 documentation and the culprit are the simple
ldr
instructions. The offset between the instruction and the data (in the data section) cannot be bigger than 1MB according to the ARM64 doc. For larger programs this will be usually the case. I changed the assembly code and replaced the simpleldr
instructions with this sequence:After changing and adapting all the simple
ldr
instructions I ran the tests, everything works and no errors reported.After adding the code to my larger project the linker was also happy, no complaints. First tests were also OK. I'm not a specialist in ARM assembler coding, thus a better solution may exist.
Attached the complete modified assembler file, compressed in a ZIP.
Werner
fp_arm64_asm.S.zip