unable to compile: unrecognized relocation 0x2a in section text

Relocation 42 on x86-64 is R_X86_64_REX_GOTPCRELX. These relocations are used for optimizations implemented in binutils 2.26 and later.

You will either need to upgrade your binutils version, or re-compile the library you want to use with your current toolchain version.


You need upgrade your GCC version. You can do so by running these commands:

yum install centos-release-scl -y
yum install devtoolset-7 -y
scl enable devtoolset-7 bash

Tags:

Gcc

Ld

Binutils