Apple Darwin Manuel d'utilisateur Page 12

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 68
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 11
There are many differences between 32-bit and 64-bit environments in OS X, including tool usage changes,
changes to the size and alignment of data types, alignment pragmas, and I/O Kit drivers. This chapter describes
the main changes developers should be aware of when porting code to 64-bit. You should read this chapter
if you've decided to port your code to 64-bit or if you are writing a new code from scratch.
Tools Changes
You'll find a number of issues when porting code to a 64-bit executable. You can address most of these issues
with subtle tweaks to your code. However, before you touch the first line of code, there are a few broad issues
you should be aware of:
Compiling an application as a 64-bit executable requires you to use GCC 4.0 or later. See Compiling 64-Bit
Code Using GCC (page 31) for information about related compiler flags.
Xcode has additional options related to 64-bit compilation. For information about compiling 64-bit
applications with Xcode, see Compiling 64-Bit Code Using Xcode (page 32).
Any tools that understand the Mach-O ABI (stack frames, calling convention, and so on) must change.
These changes affect mainly third-party compilers and linkers. For more information, see OS X ABI Mach-O
File Format Reference.
Data Type Changes
This section describes the changes to data type sizes and alignment in 64-bit executables, and explains how
these changes will impact your code.
Data Type Size and Alignment
OS X uses two data models: ILP32 (in which integers, long integers, and pointers are 32-bit quantities) and
LP64 (in which integers are 32-bit quantities, and long integers and pointers are 64-bit quantities). Other types
are equivalent to their 32-bit counterparts (except for size_t and a few others that are defined based on the
size of long integers or pointers).
2012-12-13 | Copyright © 2004, 2012 Apple Inc. All Rights Reserved.
12
Major 64-Bit Changes
Vue de la page 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 67 68

Commentaires sur ces manuels

Pas de commentaire