Other eld Processing
eld Manual—527255-009
4-13
Renaming Symbols
input files contained C++. An informational message is generated if the input files
contained C++.
When
eld
is creating a loadfile it also performs C++ dialect checking against all the
DLL's that it sees as part of that load. The check is that no DLL has the opposite C++
dialect from that seen in an input linkfile.
Note that the use of
-set CplusPlusDialect cppneutral
does not affect this
check. If this check fails a warning message is generated; it is not considered an error
because different DLL's might be used at runtime.
Renaming Symbols
The
-rename
option affects how the linker treats each input linkfile as it is reading it in.
This option takes two parameters,
symbol-1
and
symbol-
2. The option has no effect
unless this linkfile defines a global symbol named
symbol-
1.
eld
reports an error if this
same linkfile also defines a global symbol named
symbol-
2. The linkfile that defined
symbol-1
is now considered to define a symbol named
symbol-
2, with the same
properties that
symbol-1
had. The linkfile is still considered to declare a symbol named
symbol-
1, with the same properties as before, except that it is now an external
reference rather than a definition.
As a result, if the object file being built would have defined a symbol named
symbol-
1,
it will now define
symbol-2
instead. If there were references to
symbol-
1, those will still
refer to
symbol-
1, and therefore they could not be resolved within this same object file.
If a new linkfile is being built with the
-r
option, a future link could combine this linkfile
with another one that supplied a definition of
symbol-
1, to satisfy such references. Or,
in general, the references could be satisfied in other DLLs.
One purpose of this option is to allow one copy of
symbol-1
to be replaced by another
one, without having to recompile the source that created the linkfile containing
symbol-
1. For example, the given object file that defines
symbol-1
may be put through the
linker with the
-r
and
-rename
options to create another linkfile that no longer
defines
symbo
1, and then that linkfile could be linked with another one that provides a
different definition of
symbol-
1. For this purpose it is not necessary that the name
symbol-2
ever be referenced. However, when a procedure is renamed, the new version
of
symbol-1
might wish to do the same things that the older
symbol-1
would have
done, plus some new things. It could do this by calling
symbol-2
to do the old stuff, and
having additional code for the new stuff.
Any number of
-rename
options may be in the command stream. They all apply to all
the input linkfiles, regardless of where they occur in the command stream. As each
input linkfile is processed, the linker does the processing described above for each
-rename
option, in the order that the
-rename
options appeared in the command
stream.
Summary of Contents for eld
Page 4: ......
Page 8: ...Contents eld Manual 527255 009 iv ...
Page 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Page 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Page 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Page 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Page 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...