[Info-vax] Linking problem with multiply defined symbols, how to resolve?
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Sep 30 13:24:30 EDT 2022
On 2022-09-30, Johnny Billquist <bqt at softjar.se> wrote:
>
> Maybe I wasn't paying attention. I don't think I've seen a previous
> suggested solution that applies to VMS. And the solution for Unix from
> which this started is questionable how well it actually works (not
> entirely clear *which* symbol would in the end be the one your
> application would resolve to).
>
_IF_ I understand what is being asked for here (two different source code
modules both defining the same global symbol name), then it doesn't matter
in Unix provided both symbols are the same size, and of the same type, as
the code in both modules will end up referencing the same memory area.
IIRC, if one symbol definition is of a different type, or a different size,
compared to the other symbol, doesn't the GNU linker issue an error during
linking ?
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list