X

News, tips, partners, and perspectives for the Oracle Solaris operating system

Displacement Relocation Warnings - what do they mean?

There have been a couple postings recently regarding relocation warnings that have been observed when using the link-editors -z verbose option. The first warning originates from building a shared object:

ld: warning: relocation warning: R_SPARC_DISP32: file shared.o: \ 
    symbol <unknown>: displacement relocation applied to the \ 
    symbol __RTTI__1nEBase_: at 0x8: displacement relocation will \ 
    not be visible in output image

Then, if this shared object is referenced as a dependency when building a dynamic executable, another warning can be generated:

ld: warning: relocation warning: R_SPARC_COPY: file shared.so: \ 
    symbol xxxx: may contain displacement relocation

These warnings stem from an old request from the compiler folks to help prevent problems with displacement relocations and copy relocations.

You have to be a little relocation savvy to understand these scenarios — they make my head hurt. Investigations are underway to determine why these warnings are starting to surface.

Join the discussion

Comments ( 1 )
  • Srikar Thursday, April 26, 2018
    I'm facing the same issue when migrating the project from solaris to Linux and really no idea what do they mean, so I would like to join the session to get some idea on it.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha