fix modules oopsing in lguest guests

The assembly templates for lguest guest patching are in the .init.text
section.  This means that modules get patched with "cc cc cc cc" or similar
junk.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Rusty Russell 2007-09-24 21:24:44 -07:00 committed by Linus Torvalds
parent fdfb870f8e
commit bbbd2bf00b
1 changed files with 3 additions and 3 deletions

View File

@ -22,8 +22,9 @@
jmp lguest_init jmp lguest_init
/*G:055 We create a macro which puts the assembler code between lgstart_ and /*G:055 We create a macro which puts the assembler code between lgstart_ and
* lgend_ markers. These templates end up in the .init.text section, so they * lgend_ markers. These templates are put in the .text section: they can't be
* are discarded after boot. */ * discarded after boot as we may need to patch modules, too. */
.text
#define LGUEST_PATCH(name, insns...) \ #define LGUEST_PATCH(name, insns...) \
lgstart_##name: insns; lgend_##name:; \ lgstart_##name: insns; lgend_##name:; \
.globl lgstart_##name; .globl lgend_##name .globl lgstart_##name; .globl lgend_##name
@ -34,7 +35,6 @@ LGUEST_PATCH(popf, movl %eax, lguest_data+LGUEST_DATA_irq_enabled)
LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax) LGUEST_PATCH(pushf, movl lguest_data+LGUEST_DATA_irq_enabled, %eax)
/*:*/ /*:*/
.text
/* These demark the EIP range where host should never deliver interrupts. */ /* These demark the EIP range where host should never deliver interrupts. */
.global lguest_noirq_start .global lguest_noirq_start
.global lguest_noirq_end .global lguest_noirq_end