Created attachment 26144 [details] Uboot nand_dump testcase gcc-patches discussion thread: http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01240.html During final output of objects, existence of a .text.unlikely section triggers a section flag mismatch when looking up in the section htab. More information in mailing list thread, attached are testcases, a larger one from U-boot, and a very minimal one trying to demonstrate the fail. (for the minimal testcase, use -Os/-O2 -mrelocatable to trigger, for the Uboot one add -ffreestanding)
Created attachment 26145 [details] Minimal testcase
Author: meissner Date: Wed Dec 28 18:02:49 2011 New Revision: 182710 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182710 Log: Fix PR 51623 Added: trunk/gcc/testsuite/gcc.target/powerpc/pr51623.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/testsuite/ChangeLog
Fixed in subversion revision 182710.
Author: meissner Date: Wed Dec 28 20:53:30 2011 New Revision: 182712 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182712 Log: Backport PR 51623 change Added: branches/gcc-4_6-branch/gcc/testsuite/gcc.target/powerpc/pr51623.c - copied unchanged from r182710, trunk/gcc/testsuite/gcc.target/powerpc/pr51623.c Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/config/rs6000/rs6000.c branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
Author: meissner Date: Thu Dec 29 21:13:10 2011 New Revision: 182731 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182731 Log: Update PR 51623, to eliminate checks against being in the text section. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c