I have compiled my tool on gcc-4 on which other tools are dependent. I'm being asked to use -mcmodel=medium
while compiling my base code as dependent tools are encountering error: relocation overflow
while linking on gcc-8 on RHEL platform as follows:
SomeLibrary.a(SomeObject.o)(.text._bla_bla_bla): error: relocation overflow
collect2: error: ld returned 1 exit status
cook: command g++: exit status 1
This error: relocation overflow
is occurring many times back to back at the end of linking and then exiting like this.
Does using -fPIC
while compiling may solve it?
Quite e newbie in gcc-8/Linux, help would be much appreciated!