You are previewing UNIX to Linux.
O'Reilly logo
UNIX to Linux

Book Description

Port Your UNIX® Applications to Linux®–Quickly, Efficiently, and Reliably

Increasingly, developers, architects, and project managers face the challenge of porting their C, C++, and Java applications from UNIX® to Linux® environments. Now, there’s a definitive, start-to-finish guide to porting applications from today’s most widely used UNIX platforms: Solaris™, HP-UX, and AIX®.

Three of IBM’s most-experienced Linux porting specialists lead you through your entire project: scoping, analysis, recoding, and testing. They present a start-to-finish porting methodology, realistic discussions of key porting tasks, and a questionnaire for assessing the work involved in any new project. You’ll discover what Linux offers in terms of APIs, library functions, versioning, system features, and tools–and the implications for your project. Next, the authors address each individual UNIX® platform in detail, identifying specific porting challenges and best-practice solutions. Coverage includes

·        Understanding the Linux environment: GNU binutils, Java environments, shells, packaging options, and more

·        Uncovering and addressing project unknowns, variables, and other risks

·        Handling specific platform differences: standards, compilers, linkers, versioning, system/library calls, threads, and more

·        Testing and debugging ported applications using the GNU debugger and Linux memory leak and performance tracing tools

·        Contains quick references to UNIX® and Linux APIs, compilers, and linker options, and a discussion of porting issues unique to IBM’s POWER architecture

Whether you need a start-to-finish guide or a concise reference, you’ll find this book an indispensable resource for all your UNIX®-to-Linux porting projects.

Table of Contents

  1. Copyright
    1. Dedication
  2. Prentice Hall Open Source Software Development Series
  3. Preface
    1. How This Book Is Organized
    2. How to Use This Book
  4. Acknowledgments
  5. About the Authors
  6. 1. Porting Project Considerations
    1. 1.1. Software Application Business Process
    2. 1.2. The Porting Process
      1. 1.2.1. Scoping
      2. 1.2.2. Analysis
      3. 1.2.3. Porting
      4. 1.2.4. Testing
      5. 1.2.5. Support
    3. 1.3. Defining Project Scope and Objectives
    4. 1.4. Estimating
      1. 1.4.1. Skill Levels and Porting Experience
      2. 1.4.2. Compiler
      3. 1.4.3. Third-Party and Middleware Product Availability
      4. 1.4.4. Build Environment and Tools
      5. 1.4.5. Platform-Dependent Constructs
      6. 1.4.6. Platform- and Hardware-Dependent Code
      7. 1.4.7. Test Environment and Setup
      8. 1.4.8. User Interface Requirements
    5. 1.5. Creating a Porting Project Schedule
    6. 1.6. Porting Process from a Business Perspective
    7. 1.7. Annotated Sample Technical Questionnaire
      1. 1.7.1. Platform-Specific Information
      2. 1.7.2. Application-Specific Information
      3. 1.7.3. Database Information
      4. 1.7.4. Porting Project Time Schedule Information
      5. 1.7.5. Testing-Specific Information
      6. 1.7.6. Porting Project Execution Information
    8. 1.8. Summary
  7. 2. Scoping
    1. 2.1. Compilers
      1. 2.1.1. GNU gcc C Compiler
      2. 2.1.2. GNU g++ (C++ ) Compiler
      3. 2.1.3. GNU g77 FORTRAN
      4. 2.1.4. GNU Compiler for Java
      5. 2.1.5. GNU Cobol
      6. 2.1.6. Compilers from Other Sources
    2. 2.2. Java Environment
    3. 2.3. Build Environment
      1. 2.3.1. gmake
      2. 2.3.2. GNU Binutils
        1. 2.3.2.1. The GNU ld
      3. 2.3.3. The GNU as
      4. 2.3.4. Integrated Development Environment
    4. 2.4. Linux Shells
    5. 2.5. Packaging
      1. 2.5.1. Packaging the Application with RPM
      2. 2.5.2. Basic RPM Usage
        1. 2.5.2.1. rpm -i
        2. 2.5.2.2. rpm –e
        3. 2.5.2.3. rpm -U
        4. 2.5.2.4. rpm –q
        5. 2.5.2.5. rpm -V
      3. 2.5.3. Baseline Packaging Format as Recommended by the LSB
    6. 2.6. Project Management Tasks
    7. 2.7. Summary
  8. 3. Analysis
    1. 3.1. Linux Standards
    2. 3.2. GNU libc
      1. 3.2.1. glibc Conformance
    3. 3.3. GNU Scientific Library
    4. 3.4. Shared Libraries
    5. 3.5. Library Versioning,
      1. 3.5.1. External Library Versioning
      2. 3.5.2. Symbol Versioning
    6. 3.6. Dynamic Linker (or Runtime Linker)
      1. 3.6.1. Programming Interface
      2. 3.6.2. Lazy Relocation
      3. 3.6.3. Initializing and Finalizing Routine
    7. 3.7. System Calls
    8. 3.8. Large Page Support
    9. 3.9. The Native POSIX Threads Library (NPTL)
      1. 3.9.1. Maximum Number of Threads
    10. 3.10. Internationalization (I18N) and Localization
      1. 3.10.1. Iconv Support
      2. 3.10.2. How to Create a Message Catalog
    11. 3.11. Big/Little-Endian Environment
    12. 3.12. 32- to 64-Bit Migration
      1. 3.12.1. Common Migration Mistakes
        1. 3.12.1.1. Assuming int and ptr Are the Same in LP64
        2. 3.12.1.2. Overlooking int and long Data Type Size Difference
        3. 3.12.1.3. Ignoring Signed Extensions
        4. 3.12.1.4. Not Checking for String Conversions
      2. 3.12.2. Best Practices
    13. 3.13. Summary
  9. 4. Porting Solaris Applications
    1. 4.1. Preliminary Tasks
      1. 4.1.1. Set Up the Porting System
      2. 4.1.2. Set Up the Code Change Management System
      3. 4.1.3. Set Up the Build System
    2. 4.2. General Differences
      1. 4.2.1. C Language
      2. 4.2.2. C++ Language
      3. 4.2.3. GNU C/C++ Language
      4. 4.2.4. Java Language
      5. 4.2.5. Threads
      6. 4.2.6. Standards Comparison
    3. 4.3. Compilers
      1. 4.3.1. C Compiler
      2. 4.3.2. C Compiler Options
      3. 4.3.3. C++ Compiler Options
      4. 4.3.4. Template Instantiation in GNU g++
      5. 4.3.5. Building 32- or 64-bit Objects
      6. 4.3.6. Compiler Optimization and Performance Options
      7. 4.3.7. Name Space Selection on Linux Platform
    4. 4.4. Linker
      1. 4.4.1. Export Maps
      2. 4.4.2. Linker Tools
      3. 4.4.3. Shared Libraries
      4. 4.4.4. Library Versioning
      5. 4.4.5. Dynamic Linker (or Runtime Linker)
    5. 4.5. Porting Shell Scripts to Linux
    6. 4.6. Internationalization and Localization
    7. 4.7. Make
      1. 4.7.1. Built-In Makefile Variables for C++
      2. 4.7.2. Library Dependencies
      3. 4.7.3. Empty Rules
      4. 4.7.4. Current Targets
      5. 4.7.5. SCCS and RCS Files
      6. 4.7.6. Conditional Macro Assignment
      7. 4.7.7. Pattern-Replacement Macro References
      8. 4.7.8. VPATH
      9. 4.7.9. Command Execution
      10. 4.7.10. Special Targets
      11. 4.7.11. Environment Variables
      12. 4.7.12. Exit Status
    8. 4.8. Debugger
    9. 4.9. Threads
      1. 4.9.1. Solaris libthread Versus Linux libpthread
      2. 4.9.2. Solaris libpthread Versus Linux libpthread
      3. 4.9.3. Cancellation Points
      4. 4.9.4. C++ Exceptions and Linux Threads
    10. 4.10. Signals
      1. 4.10.1. Signal Actions
      2. 4.10.2. Simple Signals
      3. 4.10.3. Signal Support in Linux
      4. 4.10.4. POSIX Signal-Catching Function
      5. 4.10.5. Signal Sets
      6. 4.10.6. Signal Information
      7. 4.10.7. kill()
    11. 4.11. System Calls
      1. 4.11.1. open()
      2. 4.11.2. fcntl()
      3. 4.11.3. dirent
      4. 4.11.4. CPU Affinity
      5. 4.11.5. fork()
    12. 4.12. System Libraries
    13. 4.13. Solaris and Linux APIs
      1. 4.13.1. Memory Management
      2. 4.13.2. Interprocess Communication (IPC)
        1. 4.13.2.1. Pipes
        2. 4.13.2.2. FIFOs
        3. 4.13.2.3. POSIX Messages
        4. 4.13.2.4. POSIX Semaphores
        5. 4.13.2.5. POSIX Shared Memory
        6. 4.13.2.6. System V Messages
        7. 4.13.2.7. System V Semaphores
        8. 4.13.2.8. System V Shared Memory
      3. 4.13.3. Memory Placement Optimization (MPO)
      4. 4.13.4. vfstab
      5. 4.13.5. posix_spawn() and posix_spawnp()
      6. 4.13.6. plock()
      7. 4.13.7. waitpid()
    14. 4.14. Scientific Library
    15. 4.15. Large Page Support
    16. 4.16. Some Solaris Nonportable Programming Practices
    17. 4.17. Summary
  10. 5. Porting AIX Applications
    1. 5.1. Preliminary Tasks
      1. 5.1.1. Set Up the Porting System
      2. 5.1.2. Set Up the Code Change Management System
      3. 5.1.3. Set Up the Build System
    2. 5.2. General Differences
      1. 5.2.1. C Language
      2. 5.2.2. C++ Language
      3. 5.2.3. GNU C/C++ Language
      4. 5.2.4. Java Language
      5. 5.2.5. Threads
      6. 5.2.6. Standards Comparison
    3. 5.3. Compilers
      1. 5.3.1. Invoking the Compiler
    4. 5.4. Make
      1. 5.4.1. gmake Condition Statements
    5. 5.5. Linker
      1. 5.5.1. Linker Incompatibilities
      2. 5.5.2. Linker: AIX to Linux Reference
    6. 5.6. AIX Versus Linux Shared Library Creation
    7. 5.7. Dynamic Loading
    8. 5.8. Template Instantiation Differences Between AIX and Linux
      1. 5.8.1. Using #pragma or #include
      2. 5.8.2. Other Template Options Available Under GNU
        1. 5.8.2.1. fno-implicit-templates
    9. 5.9. C++filt Utility
    10. 5.10. System APIs: AIX/Linux
      1. 5.10.1. AIX/Linux I/O Service APIs
    11. 5.11. Selected AIX/Linux System API Comparisons
      1. 5.11.1. getfsent(), getfsfile(), getfstype(), getfsspec()
        1. 5.11.1.1. AIX Prototype
        2. 5.11.1.2. Linux Prototype
        3. 5.11.1.3. Detail Comparison
        4. 5.11.1.4. Additional Data: Linux-Specific
        5. 5.11.1.5. Return Value
      2. 5.11.2. ioctl()
        1. 5.11.2.1. AIX Prototype
        2. 5.11.2.2. Linux Prototype
        3. 5.11.2.3. Detail Comparison
          1. AIX
        4. 5.11.2.4. Return Value
        5. 5.11.2.5. Errors
        6. 5.11.2.6. ERRNO(s) Not Supported in Linux
      3. 5.11.3. read(), write()
        1. 5.11.3.1. AIX Prototype
        2. 5.11.3.2. Linux Prototype
        3. 5.11.3.3. Detail Comparison
        4. 5.11.3.4. Additional Info: AIX/Linux
        5. 5.11.3.5. Linux Restrictions
        6. 5.11.3.6. Return Value
        7. 5.11.3.7. Errors
          1. Conforming To
      4. 5.11.4. confstr()
        1. 5.11.4.1. AIX Prototype
        2. 5.11.4.2. Linux Prototype
        3. 5.11.4.3. Detail Comparison
      5. 5.11.5. opendir()
        1. 5.11.5.1. AIX Prototype
        2. 5.11.5.2. Linux Prototype
        3. 5.11.5.3. Detail Comparison
        4. 5.11.5.4. ERRNO
      6. 5.11.6. readdir()
      7. 5.11.7. fcntl()
        1. 5.11.7.1. AIX Prototype
        2. 5.11.7.2. Linux Prototype
        3. 5.11.7.3. Detail Comparison
        4. 5.11.7.4. Return Value
        5. 5.11.7.5. Errors
        6. 5.11.7.6. ERRNOs Not Supported in Linux
      8. 5.11.8. llseek(), lseek(), lseek64()
        1. 5.11.8.1. AIX Prototype
        2. 5.11.8.2. Linux Prototype
        3. 5.11.8.3. Detail Comparison
        4. 5.11.8.4. Additional Info: AIX/Linux, lseek Only
        5. 5.11.8.5. Return Value
        6. 5.11.8.6. Errors
        7. 5.11.8.7. ERRNOs Not Supported in Linux
      9. 5.11.9. uname()
        1. 5.11.9.1. AIX Prototype
        2. 5.11.9.2. Linux Prototype
        3. 5.11.9.3. Details Comparison
      10. 5.11.10. syslog(), closelog(), openlog()
        1. 5.11.10.1. AIX Prototype
        2. 5.11.10.2. Linux Prototype
        3. 5.11.10.3. Details Comparison
      11. 5.11.11. swapoff(), swapon()
        1. 5.11.11.1. AIX Prototype
        2. 5.11.11.2. Linux Prototype
        3. 5.11.11.3. Details Comparision
        4. 5.11.11.4. Return Value
        5. 5.11.11.5. Errors
        6. 5.11.11.6. ERRNO(s) Not Implemented in Linux
      12. 5.11.12. acct()
        1. 5.11.12.1. Linux/AIX Prototype
        2. 5.11.12.2. Detail Comparison
        3. 5.11.12.3. Return Value
        4. 5.11.12.4. Errors
        5. 5.11.12.5. ERRNO(s) Not Implemented in Linux
      13. 5.11.13. mmap(), mmap64(), munmap()
        1. 5.11.13.1. AIX Prototype
        2. 5.11.13.2. Linux Prototype
        3. 5.11.13.3. Detail Comparison
        4. 5.11.13.4. Return Value
        5. 5.11.13.5. Errors
        6. 5.11.13.6. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      14. 5.11.14. pread(), pwrite()
        1. 5.11.14.1. Linux Prototype
        2. 5.11.14.2. AIX Prototype
        3. 5.11.14.3. Detail Comparison
        4. 5.11.14.4. Additional Data: Linux-Specific
        5. 5.11.14.5. Return Value
        6. 5.11.14.6. Errors
        7. 5.11.14.7. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      15. 5.11.15. stat(), lstat(), fstat()
        1. 5.11.15.1. AIX Prototype
        2. 5.11.15.2. Linux Prototype
        3. 5.11.15.3. Detail Comparison
        4. 5.11.15.4. ERRNO(s) Not Implemented in AIX
      16. 5.11.16. ptrace()
        1. 5.11.16.1. AIX Prototype
        2. 5.11.16.2. AIX5L Prototype
        3. 5.11.16.3. Linux Prototype
        4. 5.11.16.4. Detail Comparison
        5. 5.11.16.5. ERRNO(s) Not Implemented in Linux
      17. 5.11.17. setgid(), setregid()
        1. 5.11.17.1. AIX/Linux Prototype
        2. 5.11.17.2. Detail Comparison
        3. 5.11.17.3. Return Value
        4. 5.11.17.4. Errors
        5. 5.11.17.5. ERRNO(s) Not Implemented in Linux
      18. 5.11.18. sync()
        1. 5.11.18.1. AIX Prototype
        2. 5.11.18.2. Linux Prototype
        3. 5.11.18.3. Detail Comparison
      19. 5.11.19. wait3(), wait4()
        1. 5.11.19.1. AIX Prototype
        2. 5.11.19.2. Linux Prototype
        3. 5.11.19.3. Detail Comparison
        4. 5.11.19.4. Return Value
        5. 5.11.19.5. Errors
        6. 5.11.19.6. ERRNO(s) Not Implemented in Linux
      20. 5.11.20. getcwd()
        1. 5.11.20.1. AIX Prototype
        2. 5.11.20.2. Linux Prototype
        3. 5.11.20.3. Detail Comparison
        4. 5.11.20.4. Errors
        5. 5.11.20.5. ERRNO(s) Not Implemented in Linux
      21. 5.11.21. mount(), umount(), vmount()
        1. 5.11.21.1. AIX Prototype
        2. 5.11.21.2. Linux Prototype
        3. 5.11.21.3. Detail Comparison
        4. 5.11.21.4. Additional Data: Linux-Specific
        5. 5.11.21.5. Return Value
        6. 5.11.21.6. Errors
          1. Portability
      22. 5.11.22. readv(), writev()
        1. 5.11.22.1. AIX Prototype
        2. 5.11.22.2. Linux Prototype
        3. 5.11.22.3. Detail Comparison
        4. 5.11.22.4. Return Value
        5. 5.11.22.5. Errors
        6. 5.11.22.6. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      23. 5.11.23. select()
        1. 5.11.23.1. AIX Prototype
        2. 5.11.23.2. Linux Prototype
        3. 5.11.23.3. select(), pselect()
        4. 5.11.23.4. Return Value
        5. 5.11.23.5. Errors
        6. 5.11.23.6. Example
        7. 5.11.23.7. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      24. 5.11.24. reboot()
        1. 5.11.24.1. AIX Prototype
        2. 5.11.24.2. Linux Prototype
        3. 5.11.24.3. Detail Comparison
        4. 5.11.24.4. Return Value
        5. 5.11.24.5. Errors
        6. 5.11.24.6. ERRNO(s) Not Implemented in Linux
      25. 5.11.25. chroot()
        1. 5.11.25.1. AIX/Linux Prototype
        2. 5.11.25.2. Details Comparison
        3. 5.11.25.3. Return Value
        4. 5.11.25.4. Errors
        5. 5.11.25.5. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      26. 5.11.26. fstatfs(), statfs()
        1. 5.11.26.1. AIX/Linux Prototype
        2. 5.11.26.2. Detail Comparison
          1. Linux
          2. AIX
        3. 5.11.26.3. Return Value
        4. 5.11.26.4. Errors
        5. 5.11.26.5. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      27. 5.11.27. poll()
        1. 5.11.27.1. AIX Prototype
        2. 5.11.27.2. Linux Prototype
        3. 5.11.27.3. Detail Comparison
          1. AIX
          2. Linux
        4. 5.11.27.4. Return Value
        5. 5.11.27.5. Errors
        6. 5.11.27.6. ERRNO(s) Not Implemented in Linux
          1. Conforming To
      28. 5.11.28. quotactl()
        1. 5.11.28.1. AIX Prototype
        2. 5.11.28.2. Linux Prototype
        3. 5.11.28.3. Detail Comparison
        4. 5.11.28.4. Return Values
        5. 5.11.28.5. Errors
    12. 5.12. Some AIX Nonstandard Programming Practices
    13. 5.13. Signals
      1. 5.13.1. Signal Actions
      2. 5.13.2. Simple Signals
        1. 5.13.2.1. AIX Prototype
        2. 5.13.2.2. Linux Prototype
        3. 5.13.2.3. Detail Comparison
        4. 5.13.2.4. Return Value
        5. 5.13.2.5. Errors
        6. 5.13.2.6. Signal Values
    14. 5.14. Network Programming
    15. 5.15. Interprocess Communications
      1. 5.15.1. Semaphores
      2. 5.15.2. System V Semaphore sets
      3. 5.15.3. Message Queues (mqueue.h)
      4. 5.15.4. Shared Memory
    16. 5.16. POSIX Threads
      1. 5.16.1. Linux Versus AIX Thread Models
      2. 5.16.2. Kernel Space Threads
      3. 5.16.3. User-Space Threads
      4. 5.16.4. AIX to Linux POSIX Threads Cross-Reference
    17. 5.17. Large Page Support
    18. 5.18. Common APIs
    19. 5.19. Summary
  11. 6. Porting HP-UX Applications
    1. 6.1. Preliminary Tasks
      1. 6.1.1. Set Up the Porting System
      2. 6.1.2. Set Up the Code Change Management System
      3. 6.1.3. Set Up the Build System
    2. 6.2. General Differences
      1. 6.2.1. C Language
      2. 6.2.2. C++ Language
      3. 6.2.3. GNU C/C++ Language
      4. 6.2.4. Java Language
      5. 6.2.5. Threads
      6. 6.2.6. Standards Comparison
    3. 6.3. The Compilers
      1. 6.3.1. C Compiler Options
      2. 6.3.2. C++ Compiler Options
      3. 6.3.3. Template Instantiation in GNU g++
      4. 6.3.4. Building 32- or 64-Bit Binaries
      5. 6.3.5. Compiler Optimization and Performance Options
      6. 6.3.6. Porting and Compiling Using GNU
      7. 6.3.7. Namespace Selection on Linux Platform
    4. 6.4. Linker
      1. 6.4.1. Export Map
      2. 6.4.2. Linker Tools
    5. 6.5. Library Versioning
      1. 6.5.1. Library Versioning on HP-UX
      2. 6.5.2. Library Versioning on Linux
    6. 6.6. Dynamic Linking and Shared Libraries
      1. 6.6.1. GNU libtool
    7. 6.7. Porting Shell Scripts to Linux
    8. 6.8. Internationalization (I18N)
      1. 6.8.1. iconv Support and Message Catalogs
    9. 6.9. Software Development Tools
      1. 6.9.1. Makefile Syntax
        1. 6.9.1.1. Target for the Form file((entry))
        2. 6.9.1.2. Use of :=
        3. 6.9.1.3. Use of $$@
        4. 6.9.1.4. Empty Rules
        5. 6.9.1.5. Suffix Support
      2. 6.9.2. Debuggers
    10. 6.10. Threads
      1. 6.10.1. Threads Support in HP-UX and Linux
      2. 6.10.2. Differences in HP-UX DCE and POSIX Threads
        1. 6.10.2.1. Error Returns
        2. 6.10.2.2. Threading Model
        3. 6.10.2.3. Sigwait() Function
        4. 6.10.2.4. Mutex API Differences
        5. 6.10.2.5. Condition Variable Differences
        6. 6.10.2.6. Changes in *_r APIs
      3. 6.10.3. Debugging Linux Threads
      4. 6.10.4. C++ Exceptions and Linux Threads
      5. 6.10.5. Linking with Thread-Safe Libraries
    11. 6.11. Signals
      1. 6.11.1. Signal Actions
      2. 6.11.2. Simple Signals
      3. 6.11.3. Signals Sent
      4. 6.11.4. Signal Support in Linux
      5. 6.11.5. POSIX Signal-Catching Function
      6. 6.11.6. Signal Information
      7. 6.11.7. Signal Default Actions
    12. 6.12. HP-UX System Calls and Linux Equivalents
      1. 6.12.1. Determining POSIX API Support
      2. 6.12.2. Determining Linux Kernel Version
    13. 6.13. System Libraries
    14. 6.14. GNU Scientific Library
    15. 6.15. HP-UX and Linux APIs
      1. 6.15.1. glibc Version
      2. 6.15.2. glibc Conformance
      3. 6.15.3. Some HP-UX Nonportable Programming Practices
    16. 6.16. Interprocess Communications
      1. 6.16.1. Pipes
      2. 6.16.2. FIFOs
      3. 6.16.3. POSIX Message Queues
      4. 6.16.4. POSIX Semaphores
      5. 6.16.5. POSIX Shared Memory
      6. 6.16.6. System V Shared Memory
      7. 6.16.7. System V Messages
      8. 6.16.8. System V Semaphores
    17. 6.17. Summary
  12. 7. Testing and Debugging
    1. 7.1. Using the GNU Debugger
      1. 7.1.1. Compiling a Program for Use with GDB
      2. 7.1.2. Invoking GDB
      3. 7.1.3. GDB Basic Commands
      4. 7.1.4. Debugging Multiple Processes
      5. 7.1.5. Debugging Multithreaded Applications
      6. 7.1.6. Stopping Multithreaded Programs
      7. 7.1.7. GDB Initialization File
      8. 7.1.8. GDB and Signals
      9. 7.1.9. Graphical Front End to GDB
    2. 7.2. strace and ltrace
    3. 7.3. cscope Utility
      1. 7.3.1. Vim and cscope
    4. 7.4. glibc Debugging Support
    5. 7.5. Memory-Debugging Tools
      1. 7.5.1. Electric Fence
      2. 7.5.2. GNU/Linux mtrace, mcheck, MALLOC_CHECK
      3. 7.5.3. Mpatrol
      4. 7.5.4. dmalloc
      5. 7.5.5. valgrind
      6. 7.5.6. Rational Purify
      7. 7.5.7. Insure++
    6. 7.6. Static Program Checker
      1. 7.6.1. Splint
      2. 7.6.2. CodeSonar
    7. 7.7. Threads trace Tool
    8. 7.8. Performance Monitoring Tools
      1. 7.8.1. Internal View
        1. 7.8.1.1. gprof
        2. 7.8.1.2. OProfile
      2. 7.8.2. External View
        1. 7.8.2.1. vmstat
        2. 7.8.2.2. iostat
        3. 7.8.2.3. top
        4. 7.8.2.4. ps
        5. 7.8.2.5. nmon
      3. 7.8.3. Other Tools
        1. 7.8.3.1. Performance Inspector
        2. 7.8.3.2. SystemTap and Kprobes
    9. 7.9. Summary
  13. A. Solaris to Linux Reference Tables
    1. A.1. Internationalization
    2. A.2. System Calls
    3. A.3. Basic Library Functions
  14. B. AIX to Linux Reference Tables
    1. B.1. AIX and Linux C Compiler Options Table
    2. B.2. AIX and Linux Linker Options Comparison Table
    3. B.3. I/O Services APIs: AIX to Linux Cross-Reference
    4. B.4. IPC Reference: AIX-Linux
  15. C. HP-UX to Linux Reference Tables
    1. C.1. HP-UX and Linux C Compiler Options Table
    2. C.2. HP-UX and Linux C++ Compiler Options Table
    3. C.3. HP-UX and Linux System Calls Comparison Table
    4. C.4. HP-UX and Linux Library API Comparison Table
  16. D. Linux on POWER
    1. D.1. Development Environment for Linux on POWER
      1. D.1.1. Compilers
      2. D.1.2. Binutils
      3. D.1.3. Java
      4. D.1.4. 64-Bit Linux Distributions
    2. D.2. Porting Considerations
    3. D.3. Architecture-Specific Differences
  17. E. gprof helper
    1. E.1. gprof helper Module for Multithreaded Applications
  18. F. Porting Issues Specific to the IBM zSeries Mainframe
    1. F.1. Linux on IBM zSeries
    2. F.2. Data Types, Addresses, and Machine Words
      1. F.2.1. 31-Bit Addresses
      2. F.2.2. Absolute Addresses
      3. F.2.3. Numbering Conventions for Bits
      4. F.2.4. Standard Data Type Sizes
    3. F.3. Compiling and Linking
      1. F.3.1. Compiler Options
      2. F.3.2. Assembler Code
      3. F.3.3. Stack Frame Layout and Linkage
      4. F.3.4. Predefined Symbols
      5. F.3.5. Debugging
    4. F.4. Byte Ordering
    5. F.5. Other Differences
      1. F.5.1. ASCII and EBCDIC Issues
      2. F.5.2. The Format of cpuinfo
    6. F.6. Variable Argument Lists
    7. F.7. Where to Find More Information
    8. F.8. Acknowledgments
  19. G. Solaris to Linux Migration: A Guide for System Administrators
    1. G.1. Packaging Tasks
    2. G.2. Installation and Upgrade Tasks
    3. G.3. User Management Tasks
    4. G.4. Network Management and Configuration
    5. G.5. NFS Management and Configuration
    6. G.6. Managing System Resources
    7. G.7. Disk and Filesystem Management
    8. G.8. Swap Management
    9. G.9. Logical Volume Management
    10. G.10. General Troubleshooting
    11. G.11. Network Troubleshooting
    12. G.12. Configuration and Other Files
    13. G.13. Comparable Commands