Displacement Relocation Warnings - what do they mean?

Rod Evans — Friday October 13, 2006

Surfing with the Linker-Aliens

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.

Surfing with the Linker-Aliens

Published Elsewhere


Surfing with the Linker-Aliens

[24] specifying a version binding
Blog Index (rie)
[26] use the compiler drivers