Friday October 13, 2006 | Surfing With a Linker Alien Rod Evans's Weblog |
|
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
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.
Technorati Tag: OpenSolaris Technorati Tag: Solaris (2006-10-13 14:24:56.0) Permalink Dynamic Object Versioning - specifying a version binding
After reading a previous posting on
versioning,
a developer asked
how they could specify what version to bind to when they built their
application. For example, from the version definitions
within
% pvs -d /lib/libelf.so.1
libelf.so.1;
SUNW_1.5;
SUNW_1.4;
....
SUNWprivate_1.1;
how could you restrict an application to only use the interfaces
defined by The Linker and Libraries Guide covers this topic in the section Specifying a Version Binding. In a nutshell, you can specify a version control mapfile directive:
% cat mapfile
libelf.so - SUNW_1.4;
Notice that the shared object name is the compilation environment name.
This is the name that gets resolved when you specify
Note, if you build against For example, this application is referencing gelf_getcap(3ELF).
% pvs -r prog
libelf.so.1 (SUNW_1.5);
....
% pvs -dos /lib/libelf.so.1 | fgrep SUNW_1.5
/lib/libelf.so.1 - SUNW_1.5: gelf_getcap;
/lib/libelf.so.1 - SUNW_1.5: gelf_update_cap;
Note also, binding to specific versions is not a panacea for building
software on release Of course, building on the latest release can provide a richer debugging environment in which to develop your software. I often try building things on the latest environment, and then fall back to the oldest environment for final testing and for creating final deliveries.
Technorati Tag: OpenSolaris Technorati Tag: Solaris (2006-10-13 10:48:22.0) Permalink |
|
||||