Solaris Transition Guide Update
  Procure somente este livro
Exibir este livro em:
Fazer download desta apostila em PDF (151 KB)

Part II Transition Information for Developers

Use this part of the update to find current information for developers on transitioning from SunOS release 4 to a SunOS release 5.8 programming environment.

Chapter 15 Compilers, Linkers, and Debuggers

This chapter updates information in the Solaris Transition Guide on compilers, linkers, and debuggers.

The chapter contains:

What's New in the Solaris 8 Operating Environment

Features added for this release include:

  • Extensions to run time link auditing. For more information, see "Linkers".

  • Secure path name change from /usr/lib to /usr/lib/secure. For more information, see "Linkers".

  • $ISALIST token support. For more information, see "Linkers".

  • coreadm command, core file management and debugging. For more information, see "Debuggers".

  • apptrace utility, a new application debugging tool. For more information, see "Debuggers".

Compilers

See the Solaris Transition Guide for previous compiler related changes.

Visit http://www.sun.com to find current information on Sun WorkshopTM and Sun Visual WorkshopTM compiler products.

Linkers

See the Solaris Transition Guide for previous information on the link-editor and executable and linking format (ELF).

New linker related features added to the Solaris 8 operating environment are:

  • Extensions to run time link auditing--additional means of invoking run time link auditing libraries is provided by the link editor options -p and -P. Additional run time link auditing interfaces la_activity() and la_objsearch() have been added. For more information, see the Linker and Libraries Guide.

  • Secure path name change from /usr/lib to /usr/lib/secure--secure directory from which files can be pre-loaded is now /usr/lib/secure for 32-bit objects and /usr/lib/secure/sparcv9 for 64-bit SPARCV9 objects. For more information, see the Linker and Libraries Guide.

  • $ISALIST token support--greater flexibility in establishing instruction set specific dependencies is provided with the new $ISALIST dynamic string token. For more information, see the Linker and Libraries Guide.

Link Editor Option Differences

See the Solaris Transition Guide for a comparison of SunOS release 4 and SunOS release 5.7 ld options.

See "Link-Editor" in Linker and Libraries Guide for current information on the link-editor.

Building Shared Libraries

See the Solaris Transition Guide or information on previous changes to shared libraries.

See the section on building shared libraries in the "Link-Editor Quick Reference" in Linker and Libraries Guide for current information.

Building Executables

See the Solaris Transition Guide for information on creating dynamic and static executables. Examples compare the behavior of SunOS release 4 -Bdynamic and -Bstatic options with SunOS release 5-dy and -dn options in building executables.

See the section on building shared libraries in the "Link-Editor Quick Reference" in Linker and Libraries Guide for current information.

See the Solaris Transition Guide information on SunOS release 5.7 library search path changes and version numbering.

Debuggers

The Solaris 8 Operating Environment introduces:

  • The coreadm command that provides flexible core file naming conventions and better core file retention. You can use the coreadm command, for example, to configure a system in which all process core files are placed in a single directory. Core files in a specific directory can then be examined whenever a Solaris process or daemon terminates abnormally. See the man page coreadm(1M).

  • The apptrace utility that enables application and system level debugging by tracing calls directly from an executable object to the shared libraries it depends upon. Call-tracing enabled by apptrace is more reliable than the previously available sotruss command. See the man page apptrace(1).

See the "Troubleshooting Solaris Software Topics" in System Administration Guide, Volume 2 for current information on debugging.

Chapter 16 Tools and Resources

This chapter updates information in the Solaris Transition Guide on changes to tools and resources for the development environment.

ioctl() Requests

The section replaces information on ioctl's in the Solaris Transition Guide.

All ioctl's related to filio, sockio, streamio, termio, termios, mtio, and dkio, as well as ioctl's supported by the older version 7 and 4BSD terminal drivers are supported. Otherwise, only the ioctl's pertaining to standard devices of Solaris 8 platforms are provided. Discrepancies between the ioctl numbers (for the ioctl's supported) in the two versions are handled transparently. The ioctl parameters are mapped whenever necessary.

Table 16-1 shows SunOS release 4 ioctl's that are not supported for use in the Solaris 8 operating environment:

Table 16-1 ioctl's Not Supported in the Solaris 8 Operating Environment

ioctl()

Description 

DKIOCGCONF

/usr/lib/libcThis ioctl is not available in this release, but it is supported by the . This ioctl is replaced by DKIOCINFO, which now includes the combined information of the SunOS release 4 DKIOCGCONF and DKIOCINFO structures.

DKIOCGLOG

This ioctl is not supported in Solaris 8. With the , it returns EINVAL.

DKIOCWCHK

In SunOS release 4 this ioctl toggles the write check on the floppy device. With the , this ioctl does not toggle the write check on the floppy device, but it returns success.

DKIOCSCMD

This ioctl is available only for the xd(7), xy(7), and ipi(7) drives. This ioctl will fail for SCSI devices. Use the USCSI ioctl for these devices.

_O_TIOCCONS

This ioctl is obsolete and is not supported by the Solaris 8 release or this package. 

O_TIOCGSIZE

This ioctl is obsolete and is not supported by the Solaris 8 release or this package.

TIOCMODG

This ioctl is obsolete and is not supported by the Solaris 8 release or this package.

TIOCMODS

This ioctl is obsolete and is not supported by the Solaris 8 release of this package.

ptrace() Request Values

See the Solaris Transition Guide for information on changes to ptrace() request values and symbolic constants for SunOS release 5.

See the Binary Compatibility Guide for current information.

Libraries

See the Solaris Transition Guide for information on libraries and dynamically allocated resources in SunOS release 5.

Using make

See the Solaris Transition Guide for information on new make utilities available in SunOS release 5 environment.

Using SCCS

See the Solaris Transition Guide for information on differences in the SunOS release 5 source code control system (SCCS).

Determining Application Compatibility

See the Solaris Transition Guide for information on using the Binary Compatibility Package.

Packaging Applications

See the Solaris Transition Guide for information on application packaging.

Packaging Utilities

See the Solaris Transition Guide for information on packaging utilities.

Toolkits

See the Solaris Transition Guide for information OPEN LOOKTM Intrinsics ToolKit (OLIT) and XViewTM.

Finding SunOS Release 4.x Tools

See the Solaris Transition Guide for information on where to find SunOS release 4 and SunOS release 5 programming tools.

Chapter 17 Networking and Internationalization

This chapter updates Solaris Transition Guide information on networking features related to the programming environment. It also discusses issues concerning the improved internationalization features.

What's New in the Solaris 8 Operating Environment

Native LDAP Native Lightweight Directory Access Protocol (LDAP) provides the Naming Service switch back-end support for LDAP based directory service. For more information, see "The Name Service Switch" in Solaris Naming Administration Guide.

Domain name system (DNS) has been added to the list of name services that can be configured through the system identification utilities. For more information, see "DNS".

The Solaris 8 operating environment provides support for over 90 locales, a new, intuitive interface for installing languages, expanded Unicode support, and improved data interoperability utilities. See "Internationalization".

Networking

The Solaris 8 operating environment continues to provide networking features discussed in the following sections in addition to offering support for LDAP and DNS.

See NIS+ Transition Guide and NFS Administration Guide for more information.

NIS, NIS+

The Solaris 8 operating environment supports the network information service (NIS), the SunOS release 4 name service, and the network information services plus (NIS+), an enterprise-naming service of heterogeneous distributed systems.

See "Introduction to NIS+" in Solaris Naming Administration Guide for current information on NIS+.

See "Differences Between NIS and NIS+" in Solaris Naming Administration Guide or a comparison information on NIS and NIS+.

nsswitch.conf File

See "The Name Service Switch" in Solaris Naming Administration Guide for current information.

Network Interface Tap

See the Solaris Transition Guide for background information on network interface tap (NIT), no longer required in SunOS release 5.

See the STREAMS Programming Guide for current information on STREAMS drivers that can be opened and communicated with directly.

Sockets

The section replaces information on sockets in the Solaris Transition Guide.

The enables you to run SunOS release 4 dynamically-linked socket applications on SunOS release 5.8 systems. In order do so:

  • You must explicitly specify the socket library (-lsocket or -libsocket) on the compilation line.

  • You may need to link with libnsl also (use -lsocket -lnsl, not -lnsl -lsocket).

  • You must recompile all SunOS release 4 socket-based applications with the socket library to run under SunOS release 5.8.

Internationalization

See the Solaris Transition Guide for changes to internationalization made between SunOS release 4 and SunOS release 5.7.

For current and complete information on Solaris 8 internationalization support, see International Language Environments Guide.

Character Support

The SunOS release 4 software supported single-byte representation of non-ASCII characters. The Solaris 8 operating environment supports:

  • Multibyte Support Environment (MSI) programming model that enables multibyte characters (such as Chinese, Japanese, or Korean characters) to be read in as logical units and stored internally as wide characters. These wide characters cannot be stored in a single byte, but they can be processed by the program as logical entities in their own right. Finally, wide characters can be written out (undergoing appropriate translation) as logical units. The MSE allows programs to be written to handle multibyte characters using the same programming model that is used for single-byte characters.

  • Code Set Independence (CSI) that removes EUC dependencies on specific codesets or encoding methods from Solaris OS libraries and commands. The CSI architecture allows the Solaris operating environment to support any UNIX file system safe encoding. CSI supports a number of new codesets, such as UTF-8, PC-Kanji, and Big-5.

  • Extended Unicode support that adds new Unicode (UTF-8) locales for Simplified Chinese and Traditional Chinese. Proper rendering of bidirectional text and context-sensitive characters is fully supported for Complex Text Layout (CTL) scripts such as Arabic, Hebrew and Thai in the en_US.UTF-8 locale .

    For detailed information, see International Language Environments Guide.

Message Catalogs

See the Solaris Transition Guide for a brief summary on creating message catalogs.

For detailed information, see Solaris 8 internationalization support, see International Language Environments Guide.

Locale Database

The Solaris 8 operating environment provides support for over 90 locales.

For detailed information, see Solaris 8internationalization support, see International Language Environments Guide.

Commands

See the Solaris Transition Guide for information on changes to SunOS release 4 commands.

Libraries

See the Solaris Transition Guide for information on changes to internationalization libraries in SunOS release 5.

Solaris 8 CSI-enabled Libraries

Nearly all functions in Solaris 8 libc (/usr/lib/libc.so) are CSI-enabled. However, the following functions in libc are not CSI-enabled because they are EUC-dependent functions:

  • csetcol() csetlen() euccol()

  • euclen() eucscol() getwidth()

The following macros are not CSI-enabled because they are EUC dependent

  • csetno() wcsetno() euccol()

In the Solaris 8 product, libgen (/usr/ccs/lib/libgen.a) are internationalized, but not CSI enabled.

In the Solaris 8 product, libcurses (/usr/ccs/lib/libcurses.a) are internationalized, but not CSI enabled.

Here are the five deliverables:

  • The utility (32-bit application): /usr/bin/geniconvtbl

  • 32-bit and 64-bit special iconv shared objects:

    • /usr/lib/iconv/geniconvtbl.so

    • /usr/lib/iconv/sparcv9/geniconvtbl.so

  • Sample geniconvtbl(1) input source files and system-provided binary table files for both 32-bit and 64-bit Solaris platforms: /usr/lib/iconv/geniconvtbl/srcs/

    • ISO8859-1_to_ISO646.txt

    • ISO646_to_ISO8859-1.txt

    • ISO8859-1_to_UTF-8.txt

    • UTF-8_to_ISO8859-1.txt

    • ShiftJIS_to_eucJP.txt

    • eucJP_to_ShiftJIS.txt

    • /usr/lib/iconv/geniconvtbl/binarytables/

    • ISO8859-1%ISO646.bt

    • ISO646%ISO8859-1.bt

  • Changed iconv_open(3) at 32-bit and 64-bit libc.so.1s:

    • /usr/lib/libc.so.1

    • /usr/lib/sparcv9/libc.so.1 (sparcv9 example)

  • Man pages:

    • /usr/share/man/sman1/geniconvtbl.1

    • /usr/share/man/sman4/geniconvtbl.4

Chapter 18 System and Device Configuration

This chapter updates information in the Solaris Transition Guide on changes in the Solaris operating environment that affect kernel and system developers.

The chapter contains:

What's New in the Solaris 8 Operating Environment

The devfsadm command provides an improved mechanism for managing special device files. For more information, see "Device Naming From a Developer's Perspective".

System Configuration

SunOS release 5 changes related to system configuration include the dynamically loaded kernel and kernel layout, the config and boot commands, and the /etc/system file.

Dynamically Loaded Kernel

See the Solaris Transition Guide for information on the dynamically-loaded kernel and changes to modunload(1M) and modunload(1M) commands.

See "Loading and Unloading Drivers" in Writing Device Drivers for current information on using modunload(1M) and modunload(1M) commands.

Kernel Layout

For current information, see "SunOS Kernel and Device Tree" in Writing Device Drivers

Reconfiguration Boot

See the Solaris Transition Guide for information on the SunOS release 5 reconfiguration boot.


Note -

The reconfiguration boot -r command, described in the Solaris Transition Guide, does not currently remove file system entries for devices that are physically removed from the system. For more information, see boot(1M).


Device Naming From a Developer's Perspective

This section supersedes "Device Naming From a Developer's Perspective" in Solaris Transition Guide. It focuses on the SunOS 5.8 devfsadm command that provides an improved mechanism for managing special device files in the /dev and /devices directories, including support for dynamic reconfiguration events.

In earlier SunOS 5 releases, device configuration was handled by drvconfig, which managed the physical device entries in the /devices directory, and five link generators, devlinks, disks, tapes, ports, and audlinks, which managed the logical device entries in the /dev directory. For compatibility purposes, drvconfig and the other link generators are symbolic links to the devfsadm utility.

Both reconfiguration boot processing and updating the /dev and /device directories in response to dynamic reconfiguration events are handled by devfsadmd, the daemon version of the devfsadm command. This daemon is started from the /etc/rc* scripts when a system is booted.

Since devfsadmd, the devfsadm daemon, automatically detects device configuration changes generated by any reconfiguration event, there is no need to run this command interactively.

For more information, see "What's New in Disk Management?" in System Administration Guide, Volume 1.

Chapter 19 Device Drivers and STREAMS

This chapter updates Solaris Transition Guide information on device drivers and STREAMS.

Device Drivers and STREAMS Device Drivers

See the Solaris Transition Guide for information on SunOS release 5 device driver interfaces, the devinfo command, porting considerations, and Solaris driver architecture.

STREAMS

Some areas of change for STREAMS modules are transparent I/O controls, new message types, and the autopush(1M) facility that automatically pushes a list (/etc/iu.ap) of modules on a stream. For current information on these features, see sections on the following topics in the STREAMS Programming Guide:

  • Module and Driver ioctl

  • Kernel-Level Messages

  • autopush

Transparent ioctl()s

See the Solaris Transition Guide for information on SunOS release 4 ioctl () requests.

See the STREAMS Programming Guide for current information.

See "ioctl() Requests" of this update for related information.

autopush Command

See the Solaris Transition Guide for information on SunOS release 5 autopush() command.

See STREAMS Programming Guide for current information about pushing STREAMS modules.

Device Driver Commands

See the Solaris Transition Guide for information on SunOS release 5 device driver commands.