Solaris Express Developer Edition What's New

ld Link Editor for Object Files

This developer tool enhancement is new in the Solaris Express 8/06 release.

Starting with this release, the behavior of the ld command when creating a new version of an existing output file has been changed. This change addresses a long-term issue with the way new linker output files interact with running programs that are simultaneously using the old versions of those files.

If the file being created by ld already exists, the existing file is unlinked after all input files have been processed. A new file with the specified name is then created. This behavior enables the ld command to create a new version of the file, while simultaneously allowing existing processes that are accessing the old file contents to continue running. If the old file has no other links, the disk space of the file is freed when the last process referencing the file terminates.

In releases prior to Solaris Express 8/06, the existing file was not unlinked, and was instead over-written. However, this approach had the potential to corrupt any running processes that were using the file.

For more information, see the ld(1) man page.


Note –

The new behavior of the ld command has an implication for output files that have multiple hard links in the file system. Previously, all links would remain intact, with all links accessing the new file contents. The new ld behavior “breaks” such links, with the result that only the specified output file name references the new file. All the other links continue to reference the old file. To ensure consistent behavior on any Solaris version, applications that rely on multiple hard links to linker output files should explicitly remove and re-link the other file names.