Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

While compiling one of our dependent tool, a long list relocation error is showing up while linking:

SomeLibrary.a(SomeObject.o)(.text._bla_bla_bla): error: relocation overflow
collect2: error: ld returned 1 exit status
cook: command g++: exit status 1

The dependent tool is being compiled on gcc-8.x and our tool is compiled on gcc-4.x.

This problem is specifically showing up on IBM PowerPC platform, where RHEL is compiling fine.

We are being suggested to use -mcmodel=medium while compiling our code.

Could not find much help online. Any specific purpose of using this option?

Does this answer your question? gfortran for dummies: What does mcmodel=medium do exactly? – PiRocks Feb 27, 2020 at 18:58 I'm not super familiar with PowerPC, but I assume the answer would be the same. By using -mcmodel=medium you get larger sections at the cost of some instruction density? – PiRocks Feb 27, 2020 at 19:07

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.