I think this is down to GCC 4.5 vs. 4.6; compiling with gcc-4.5 seems to
avoid this. From the GCC 4.6 release notes:
* A new inter-procedural static profile estimation pass detects
functions that are executed once or unlikely to be executed. Unlikely
executed functions are optimized for size. Functions executed once are
optimized for size except for the inner loops.
* On most targets with named section support, functions used only at
startup (static constructors and main), functions used only at exit and
functions detected to be cold are placed into separate text segment
subsections. This extends the -freorder-functions feature and is
controlled by the same switch. The goal is to improve the startup time
of large C++ programs.
Proper function placement requires linker support. GNU ld 2.21.51 on
ELF targets was updated to place those functions together within the
text section leading to better code locality and faster startup times of
large C++ programs. The feature is also supported in the Apple linker.
Support in the gold linker is planned.
Using -fno-reorder-functions also appears to avoid the problem, so I
suspect that will be the answer.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/837815
Title:
Grub 0.97-29ubuntu62 gives error "Error 6: Mismatched or corrupt
version of stage1/stage2"
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/grub/+bug/837815/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs