6 Preparing to Port Applications 6.1 Ada
Total Page:16
File Type:pdf, Size:1020Kb
Porting Applications from HP OpenVMS Alpha to HP OpenVMS Industry Standard 64 for Integrity Servers Order Number: BA442–90001 January 2005 This manual provides a framework for application developers who are migrating applications from HP OpenVMS Alpha to HP OpenVMS Industry Standard 64 for Integrity Servers. Revision/Update Information: This is a new manual. Software Version: OpenVMS I64 Version 8.2 OpenVMS Alpha Version 8.2 Hewlett-Packard Company Palo Alto, California © Copyright 2005 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Intel, Itanium, and Xeon are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. Java is a U.S. trademark of Sun Microsystems, Inc. UNIX is a registered trademark of The Open Group. Printed in the US ZK6673 This document was prepared using DECdocument, Version 3.3-1b. Contents Preface ............................................................ ix 1 Introduction 1.1 OpenVMS Industry Standard 64 for Integrity Servers . ............... 1–1 1.2 Overview of the Porting Process . ................................ 1–1 1.2.1 Evaluating the Application . ................................ 1–1 2 Fundamental Differences to Consider 2.1 Calling Standard ............................................ 2–1 2.1.1 Changes to the OpenVMS Calling Standard .................... 2–1 2.1.2 Extensions to the OpenVMS Calling Standard . ............... 2–3 2.2 Floating-Point Arithmetic ..................................... 2–4 2.2.1 Overview ............................................... 2–4 2.2.2 Impact on OpenVMS Applications ............................ 2–5 2.3 Object File Format . ........................................ 2–5 3 Assessing Needs for Porting Your Application 3.1 Overview . ................................................ 3–1 3.2 Evaluating the Application .................................... 3–2 3.2.1 Selecting the Porting Method ................................ 3–2 3.2.2 Identifying Applications to Be Ported . ....................... 3–4 3.2.3 Assessing Dependencies .................................... 3–5 3.2.3.1 Software Dependencies . ................................ 3–5 3.2.3.2 Development Environment ............................... 3–6 3.2.3.3 Operating Environment . ................................ 3–6 3.2.4 Operational Tasks ........................................ 3–6 3.3 HP Porting Resources ........................................ 3–8 3.4 Additional Considerations ..................................... 3–8 4 Migrating Source Modules 4.1 Setting Up the Migration Environment ........................... 4–2 4.1.1 Hardware ............................................... 4–2 4.1.2 Software ................................................ 4–3 4.1.2.1 HP OpenVMS Migration Software for Alpha to Integrity Servers and Translated Image Environment (TIE) ................... 4–4 4.1.3 Coexistence with Translated Images . ....................... 4–5 4.2 Compiling Applications on Alpha With Current Compiler Version ...... 4–6 4.3 Testing Applications on Alpha for Baseline Information .............. 4–7 4.4 Recompiling and Relinking on an I64 System ...................... 4–7 4.5 Debugging the Migrated Application ............................. 4–7 iii 4.5.1 Debugging . ............................................ 4–7 4.5.2 Analyzing System Crashes .................................. 4–7 4.5.2.1 System Dump Analyzer ................................ 4–8 4.5.2.2 Crash Log Utility Extractor . ............................ 4–8 4.6 Testing the Migrated Application ................................ 4–8 4.6.1 Alpha Tests Ported to I64 ................................... 4–8 4.6.2 New I64 Tests ........................................... 4–9 4.6.3 Uncovering Latent Bugs ................................... 4–9 4.7 Integrating the Migrated Application into a Software System .......... 4–9 4.8 Modifying Certain Types of Code ................................ 4–9 4.8.1 Conditionalized Code . .................................... 4–10 4.8.1.1 MACRO Sources . .................................... 4–10 4.8.1.2 BLISS Sources ........................................ 4–10 4.8.1.3 C Sources ............................................ 4–11 4.8.1.4 Existing Conditionalized Code ............................ 4–11 4.8.2 System Services With Alpha Architecture Dependencies ........... 4–12 4.8.2.1 SYS$GOTO_UNWIND .................................. 4–12 4.8.2.2 SYS$LKWSET and SYS$LKWSET_64 . ................... 4–12 4.8.3 Code With Other Dependencies on the Alpha Architecture ......... 4–12 4.8.3.1 Initialized Overlaid Program Sections . ................... 4–12 4.8.3.2 Condition Handlers Use of SS$_HPARITH .................. 4–13 4.8.3.3 Mechanism Array Data Structure ......................... 4–13 4.8.3.4 Reliance on Alpha Object File Format . ................... 4–13 4.8.4 Code that Uses Floating-Point Data Types . ................... 4–13 4.8.4.1 LIB$WAIT Problem and Solution .......................... 4–14 4.8.5 Incorrect Command Table Declaration ......................... 4–15 4.8.6 Code that Uses Threads .................................... 4–16 4.8.6.1 Thread Routines cma_delay and cma_time_get_expiration . 4–17 4.8.7 Code With Unaligned Data ................................. 4–17 4.8.8 Code that Relies on the OpenVMS Alpha Calling Standard ......... 4–18 4.8.9 Privileged Code .......................................... 4–19 4.8.9.1 Use of SYS$LKWSET and SYS$LKWSET_64 ................ 4–19 4.8.9.2 Use of SYS$LCKPAG and SYS$LCKPAG_64 ................. 4–20 4.8.9.3 Terminal Drivers . .................................... 4–20 4.8.9.4 Protected Image Sections ................................ 4–20 5 OpenVMS I64 Development Environment 5.1 Native I64 Compilers ......................................... 5–1 5.1.1 VAX MACRO–32 Compiler for OpenVMS I64 ................... 5–1 5.2 Other Development Tools . .................................... 5–2 5.2.1 Translating Alpha Code .................................... 5–3 5.3 Linking Modules ............................................ 5–3 5.3.1 Differences When Linking on OpenVMS I64 Systems . ........... 5–4 5.3.1.1 No Based Clusters . .................................... 5–4 5.3.1.2 Handling of Initialized Overlaid Program Sections on OpenVMS I64................................................. 5–5 5.3.1.3 Behavior Difference When Linking ELF Common Symbols . 5–5 5.3.2 Expanded Map File Information . ............................ 5–6 iv 5.3.3 New Linker Qualifiers and Options for OpenVMS I64 ............. 5–6 5.3.3.1 New /BASE_ADDRESS Qualifier . ....................... 5–6 5.3.3.2 New /SEGMENT_ATTRIBUTE Qualifier .................... 5–6 5.3.3.3 New /FP_MODE Qualifier ............................... 5–7 5.3.3.4 New /EXPORT_SYMBOL_VECTOR and /PUBLISH_GLOBAL_SYMBOLS Qualifiers . ............... 5–7 5.3.3.5 New Alignments for the PSECT_ATTRIBUTE Option . ....... 5–8 5.3.3.6 New GROUP_SECTIONS and SECTION_DETAILS keywords for the /FULL Qualifier .................................... 5–8 5.3.4 Mixed-Case Arguments in Linker Options, Revisited .............. 5–8 5.4 Debugging Capabilities on OpenVMS I64 Systems . ............... 5–9 5.4.1 OpenVMS Debugger ....................................... 5–9 5.4.1.1 Architecture Support . ................................ 5–9 5.4.1.2 Language Support ..................................... 5–10 5.4.1.3 Functional Areas and Commands . ....................... 5–10 5.4.1.4 Functionality Not Yet Ported ............................. 5–11 5.4.2 XDelta Debugger . ........................................ 5–11 5.4.2.1 XDelta Capabilities on OpenVMS I64 ...................... 5–11 5.4.2.2 Differences Between XDelta on OpenVMS I64 and OpenVMS Alpha Systems ........................................ 5–11 5.5 OpenVMS I64 Librarian Utility . ................................ 5–12 5.5.1 Considerations When Using the I64 Librarian ................... 5–12 5.5.2 Changes to the LBR$ Routines .............................. 5–12 5.5.3 I64 Library Format Handles UNIX-Style Weak Symbols ........... 5–13 5.5.3.1 New ELF Type for Weak Symbols . ....................... 5–13 5.5.3.2 Version 6.0 Library Index Format . ....................... 5–13 5.5.3.3 New Group-Section Symbols ............................. 5–13 5.5.3.4 Current Library Limitation with Regard to Weak and Group Symbols ............................................. 5–13 6 Preparing to Port Applications 6.1 Ada...................................................... 6–2 6.2 BASIC .................................................... 6–2 6.3 BLISS Compiler ............................................. 6–2 6.3.1 BLISS File Types and File Location Defaults ................... 6–2 6.3.2 Alpha BLISS Features Not Available . ....................... 6–3 6.3.3 OpenVMS I64 BLISS Features .............................