Re: Program compiled using FC6 g++ crash in FC5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/17/06, Jakub Jelinek <jakub@xxxxxxxxxx> wrote:
On Thu, Nov 16, 2006 at 10:46:40PM -0800, David Scriven wrote:
> I have two programs that when compiled under the latest version of g++:
> gcc version 4.1.1 20061011 (Red Hat 4.1.1-30) work perfectly
> under FC6 but give the error 'Floating point exception' when run under FC5.
> (The version of g++ in FC5 is 4.1.1 20060525 (Red Hat 4.1.1.-1)

Any program compiled/linked on FC6 will by default not work on FC5 or
earlier.  Besides the usual "glibc and other libraries are only backwards
compatible, not forward compatible" which very often renders building on
later distro version and running on earlier one impossible, in FC6 there
is additional difference that FC6 emits by default only .gnu.hash section
(and FC6 dynamic linker understands both .gnu.hash and .hash), while
FC5 and earlier dynamic linker only groks .hash section.  So, if you
are lucky and you won't happen to use any glibc/libstdc++/libgcc etc.
FC6+ only symbol versions in your program, you still need to link
with -Wl,--hash-style=both or -Wl,--hash-style=sysv if you want to have
a chance of working on earlier release.

        Jakub


Silly me. I should have just referred the OP to the FC6 RELEASE NOTES:

12.2.2. GCC Compiler Collection

This release of Fedora has been built with GCC 4.1, which is included
with the distribution.

12.2.2.1. Caveats

Fedora developers have introduced changes in the ELF .hash section
that provides symbols for dynamic linking. This new .gnu.hash section,
which is produced with the new default --hash-style=gnu option for
gcc, serves the same purpose as previous hash sections. It provides,
however, an approximately 50% increase in dynamic linking speed.
Binaries and libraries produced with the new hashing function are
incompatible with older glibc and dynamic linker releases. To use the
old-style hashing routines for compatibility with older glibc-based
systems, pass the --hash-style=sysv option instead.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux