eld Input and Output
eld Manual—527255-009
2-4
Output Object Files
Output Object Files
The linker can create a new object file or update an existing one in certain ways. When
the linker is creating a new object file, by default it creates a loadfile, but the
-r
option
instead tells the linker to create a linkfile. The TNS/E linker can also create an import
library, as described in
Creating Import Libraries
on page 3-11.
When the linker creates a new linkfile with the
-r
option, and there was only one input
file, the output file may be considered a new version of the input file. There are two
reasons why you might do this:
•
To strip the file in place, with the
-s
or
-x
option.
•
To change the specified floating point type with the
-set floattype
option.
When the linker creates a new linkfile with the
-r
option, and there was only one input
file, the linker is required to create the new file so that it has the same fingerprint as the
original file.
The two types of ELF loadfiles produced by the linker are programs and DLLs.
These are both PIC (position independent code). The default is to create a PIC
program. The option named
-call_shared
means this, and so is the default for the
TNS/E linker. The option to create a DLL is
-shared
. The option
-dll
is accepted as
a synonym for
-shared
.
eld
reports an error if you specify more than one of the
-call_shared
,
-r
, and
-
shared
options.
When a DLL is created, its DLL name can be specified with the
-soname
option.
If the
-soname
option is used, the linker accepts whatever string is given for the DLL
name, exactly as-is, and without imposing any rules as to which strings are legal DLL
names.
If the
-soname
option is not specified then the DLL name is determined to be the file
identifier of the output file. The name of the output file is determined as described in
The Creation of Output Object Files
on page 2-5. And, in this case, when the linker is
running on a host platform where the case of filenames is not significant (i.e.,
Guardian or the PC), the linker converts the DLL name to lower case. Note that, on
OSS, the default name for the output file is “a.out”, so the default DLL name is similarly
“a.out”, and that is true even if this is a Guardian subvolume.
The linker places the DLL name into the DT_SONAME
entry of the .dynamic
section
of the DLL.
The option named
-dllname
is accepted as a synonym for
-soname
.
eld
reports an
error if you specify this option when not building a DLL.
A user library is a DLL that is found in a special way by programs, but otherwise is no
different from any other DLL. The
-ul
option is intended to be used when creating a
DLL that is used as a user library.
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 ...