Forums - unsupported relocation type `R_HEX_HI16'

4 posts / 0 new
Last post
unsupported relocation type `R_HEX_HI16'
michael.stewart
Join Date: 8 Dec 15
Posts: 11
Posted: Fri, 2017-03-17 19:42

Not sure what the right Forum is for this.

SDK 3.1. I'm trying to deploy functions that already compile and run when built in the style of the examples, but I need to build them in a stand-alone CMake environment. The Host (Android ARM) side and Qaic stuff already build fine. I can even run the the new host stuff using the old HVX side modules created by the "example style" build. The hexagon-clang seems to compile things just fine, but I just can't seem to get hexagon-link to work. I get these messages:

Warning: Section names .data.QURT.FASTINT in input file /home/citeam/Qualcomm/Hexagon_SDK/3.1/libs/common/qurt/ADSPv60MP/lib/libqurt.a(qurt_fastint.o) doesnot have right permissions
Fatal: attempt to generate unsupported relocation type `R_HEX_HI16' for symbol `.eh_frame', recompile with -fPIC

The warning has been reported elsewhere. The fatal error is mysterious, though. I'm already compiling with -fPIC.

Has anyone run into this before, or know what might be causing it?

Thanks!

 

  • Up0
  • Down0
michael.stewart
Join Date: 8 Dec 15
Posts: 11
Posted: Wed, 2017-03-22 12:43

The solution was to be sure that PIC (position independent code) modules are linked, either in /pic/ subdirectories, or by replacing init.o with initS.o, fini.o with finiS.o, or crt0.o with crt1S.o.

  • Up0
  • Down0
vmorariu
Join Date: 8 Mar 17
Posts: 1
Posted: Thu, 2017-03-23 09:08

Hello,

I experience a similar issue when building in a standalone Cmake environment.

"Fatal: attempt to generate unsupported relocation type `R_HEX_GPREL16_2' for symbol `my_abcd', recompile with -fPIC"

The -fpic flag is enabled as well as "initS.o", "finiS.o" added for linking.

I built a static library "my_lib.a" which contains a function pointer that I am calling from /SDK/3.1/example/common/calculator

The function pointer points to a function from "my_lib.a" which runs on the aDsp.

In "my_lib" the function pointer is defined like this:

void (*my_abcd)(int32_t *sum) = my_abcd_sum;

where 

void my_abcd_sum(int32_t *sum)

{
    int32_t a = 3;
    int32_t b = 5;
 
    *sum = a + b;
}

 

When I call directly "my_abcd_sum()" from /calculator example it is linking fine and runs on aDsp.

  • Up0
  • Down0
nvijay.anand1
Join Date: 14 Sep 15
Posts: 11
Posted: Thu, 2021-05-06 20:56

Hi,

I get following similar error while building my application. Hexagon_Tools_version = 8.3.02, Hexagon_SDK_version = 3.4.3

Fatal: Current link configuration does not support relocation type `R_HEX_HI16'

Any fixes for this.

Thanks,

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.