Messages in this thread | | | Date | Thu, 10 Apr 2008 12:20:31 -0400 (EDT) | From | Steven Rostedt <> | Subject | Re: [PATCH] pop previous section in alternative.c |
| |
On Thu, 10 Apr 2008, H. Peter Anvin wrote:
> Linus Torvalds wrote: > > > > That would mark gcc itself as buggy, because gcc will move some things > > into the #APP/#NO_APP thing, and sometimes doesn't end the #APP at all! > > > > That is quite buggy indeed, since the whole #APP and #NO_APP string set > are arbitrary strings that are part of the gcc configuration, marked as > "what to insert before user assembly" and "what to insert after user > assembly." They are not guaranteed to be simple comments, in fact. > > In fact, gas *is* sensitive to #APP ... #NO_APP, so they are not simple > comments.
Looking at the output below, shows that testing .sections in between #APP and #NO_APP would in fact catch this bug.
-- Steve
.Ltext0: #APP .section .rodata, "a" intelnops: .byte 0x90 .byte 0x89,0xf6 .byte 0x8d,0x76,0x00 .byte 0x8d,0x74,0x26,0x00 .byte 0x90 .byte 0x8d,0x74,0x26,0x00 .byte 0x8d,0xb6,0x00,0x00,0x00,0x00 .byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00 .byte 0x90 .byte 0x8d,0xb4,0x26,0x00,0x00,0x00,0x00
.section .rodata, "a" k8nops: .byte 0x90 .byte 0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90 .byte 0x66,0x66,0x66,0x90
.section .rodata, "a" k7nops: .byte 0x90 .byte 0x8b,0xc0 .byte 0x8d,0x04,0x20 .byte 0x8d,0x44,0x20,0x00 .byte 0x8d,0x44,0x20,0x00 .byte 0x90 .byte 0x8d,0x80,0,0,0,0 .byte 0x8D,0x04,0x05,0,0,0,0 .byte 0x8D,0x04,0x05,0,0,0,0 .byte 0x90
.section .rodata, "a" p6nops: .byte 0x90 .byte 0x66,0x90 .byte 0x0f,0x1f,0x00 .byte 0x0f,0x1f,0x40,0 .byte 0x0f,0x1f,0x44,0x00,0 .byte 0x66,0x0f,0x1f,0x44,0x00,0 .byte 0x0f,0x1f,0x80,0,0,0,0 .byte 0x0f,0x1f,0x84,0x00,0,0,0,0
#NO_APP .type constant_test_bit, @function constant_test_bit: .LFB30:
| |