On Monday 11 December 2006 00:58, Randy Dunlap wrote:> > Is it OK for section .parainstructions to reference > exit.text?Yes it's ok because /* .exit.text is discard at runtime, not link time, to deal with references from .altinstructions and .eh_frame */ Same applies to paravirtops patching. -Andi
Is it OK for section .parainstructions to reference exit.text? I'm seeing: WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0) WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8) If that's OK, we need a small patch to modpost, as below. --- ~Randy From: Randy Dunlap <randy.dunlap@oracle.com> Section .parainstructions should not warn about section mismatches. WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0) WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> --- scripts/mod/modpost.c | 1 + 1 file changed, 1 insertion(+) --- linux-2.6.19-git17.orig/scripts/mod/modpost.c +++ linux-2.6.19-git17/scripts/mod/modpost.c @@ -997,6 +997,7 @@ static int exit_section_ref_ok(const cha "__bug_table", /* used by powerpc for BUG() */ ".exitcall.exit", ".eh_frame", + ".parainstructions", ".stab", "__ex_table", ".fixup",
Randy Dunlap wrote:> Is it OK for section .parainstructions to reference > exit.text? > > I'm seeing: > > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0) > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8) > > If that's OK, we need a small patch to modpost, as below. >What are the semantics of .exit.text? In principle a paravirtualized instruction can appear anywhere, so I think these warnings are bogus. The only concern is if one of these sections disappears before the paravirt_ops instruction substitution happens. J
On Sun, 2006-12-10 at 15:58 -0800, Randy Dunlap wrote:> Is it OK for section .parainstructions to reference > exit.text?Yep, it can (and will) reference any section.> From: Randy Dunlap <randy.dunlap@oracle.com> > > Section .parainstructions should not warn about section mismatches. > > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x0) > WARNING: drivers/net/hamradio/scc.o - Section mismatch: reference to .exit.text: from .parainstructions after '' (at offset 0x8) > > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>Acked-by: Rusty Russell <rusty@rustcorp.com.au>