[Bug c/35895] gcc puts code in rodata section with -Os -g -funit-at-a-time

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Apr 9 22:35:00 GMT 2008



------- Comment #2 from pinskia at gcc dot gnu dot org  2008-04-09 22:34 -------
The toplevel asm has:
asm("\t.section .rodata, \"a\"\nintelnops: "
 ".byte 0x90\n" ".byte 0x89,0xf6\n" ".byte 0x8d,0x76,0x00\n" ".byte
0x8d,0x74,0x26,0x00\n" ".byte 0x90\n" ".byte 0x8d,0x74,0x26,0x00\n" ".byte
0x8d,0xb6,0x00,0x00,0x00,0x00\n"
 ".byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n" ".byte 0x90\n" ".byte
0x8d,0xb4,0x26,0x00,0x00,0x00,0x00\n");

GCC assumes the toplevel asm will not change the section, you need to use
.previous or what ever other method to push/pop the section.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35895



More information about the Gcc-bugs mailing list