Red Hat ENTERPRISE LINUX 3 - DEVELOPER TOOLS GUIDE Guide de l'utilisateur Page 52

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 100
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 51
Chapter 4. Compiling and Building
42
The C ABI is considered to be stable, and has been so since at least RHEL3 (again, barring any
incompatibilities mentioned in the above lists). Libraries built on RHEL3 and later can be linked to
objects created on a subsequent environment (RHEL4, RHEL5, and RHEL6).
The C++ ABI is considered to be stable, but less stable than the C ABI, and only as of RHEL4
(corresponding to GCC version 3.4 and above.). As with C, this is only an upward compatibility.
Libraries built on RHEL4 and above can be linked to objects created on a subsequent environment
(RHEL5, and RHEL6).
To force GCC to generate code compatible with the C++ ABI in RHEL releases prior to RHEL4, some
developers have used the -fabi-version=1 option. This practice is not recommended. Objects
created this way are indistinguishable from objects conforming to the current stable ABI, and can be
linked (incorrectly) amongst the different ABIs, especially when using new compilers to generate code
to be linked with old libraries that were built with tools prior to RHEL4.
Warning
The above incompatibilities make it incredibly difficult to maintain ABI shared library sanity
between releases, especially if when developing custom libraries with multiple dependencies
outside of the core libraries. Therefore, if shared libraries are developed, it is highly recommend
that a new version is built for each Red Hat Enterprise Linux release.
4.1.3. Object Compatibility and Interoperability
Two items that are important are the changes and enhancements in the underlying tools used by the
compiler, and the compatibility between the different versions of a language's compiler.
Changes and new features in tools like ld (distributed as part of the binutils package) or in the
dynamic loader (ld.so, distributed as part of the glibc package) can subtly change the object files
that the compiler produces. These changes mean that object files moving to the current release of Red
Hat Enterprise Linux from previous releases may loose functionality, behave differently at runtime, or
otherwise interoperate in a diminished capacity. Known problem areas include:
ld --build-id
In RHEL6 this is passed to ld by default, whereas RHEL5 ld doesn't recognize it.
as .cfi_sections support
In RHEL6 this directive allows .debug_frame, .eh_frame or both to be emitted from .cfi*
directives. In RHEL5 only .eh_frame is emitted.
as, ld, ld.so, and gdb STB_GNU_UNIQUE and %gnu_unique_symbol support
In RHEL6 more debug information is generated and stored in object files. This information relies
on new features detailed in the DWARF standard, and also on new extensions not yet standardized.
In RHEL5, tools like as, ld, gdb, objdump, and readelf may not be prepared for this new
information and may fail to interoperate with objects created with the newer tools. In addition,
RHEL5 produced object files do not support these new features; these object files may be handled
by RHEL6 tools in a sub-optimal manner.
An outgrowth of this enhanced debug information is that the debuginfo packages that ship with
system libraries allow you to do useful source level debugging into system libraries if they are
installed. Refer to Section 5.1, “Installing Debuginfo Packages” for more information on debuginfo
packages.
Vue de la page 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 99 100

Commentaires sur ces manuels

Pas de commentaire