[Info-vax] Linking problem with multiply defined symbols, how to resolve?
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Wed Sep 28 11:24:37 EDT 2022
On 2022-09-28 07:33:58 +0000, Richard Levitte said:
> I have this problem, that I want to build an app or a shareable image,
> which is linked with another shared library, but which also implements
> its own variant of symbols that are defined in that other shared
> library.
>
> This is intentional. It works absolutely fine to do this on the Unixen
> I've access to, as well as on Windows... but VMS fails me.
It's not so reliable on various Unix systems; the results can entail
indeterminate behavior even on some Unix systems, based on an error
message I've met.
On OpenVMS, I have a tool Shimmer, which creates a new shareable image
from an existing shareable image, and that allows interception of
selected (or all) calls in the shareable image. I open-sourced this
tool a while back, and probably still have a copy of it around. If
you're interested in this interception, let me know and I'll poke
around for a copy.
Otherwise, you're going to need to have some better hygiene around your
symbols, which usually means some combination of building shareable
images and using selective search qualifier, or maybe dynamic
activation of the shareable image you want with the symbol you want at
run-time using lib$find_image_symbol, this if linker clusters mentioned
earlier don't get you where you need.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list