public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] Re: ia64 cache flushing?
Date: Tue, 17 Dec 2002 00:27:11 +0000	[thread overview]
Message-ID: <marc-linux-ia64-105590709805584@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805582@msgid-missing>

> Could someone who is Attuned with the way of ia64 linking and asm
> please look at this?  It's a userspace framework which tests the 2.5
> module code (as modified by RTH to use shared objects rather than
> simple object files).  You can see 9 architectures already done, but
> ia64 doesn't work, for reasons beyond my humble abilities.
> 
> The idea is that once all the archs are finished, I put it in the
> kernel and push the change Linus.  ia64 is the last "important" arch
> (and, naturally, the hardest 8).
> 
> Thanks in advance!
> Rusty.
> --
>   Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

Sorry, that was a hacked version.  Apply this patch.

diff -ur module-test-framework/Makefile module-test-framework-fixed/Makefile
--- module-test-framework/Makefile	2002-12-17 09:48:11.000000000 +1100
+++ module-test-framework-fixed/Makefile	2002-12-17 11:22:56.000000000 +1100
@@ -18,7 +18,7 @@
 
 # Buggy binutils on PPC needs -fPIC
 KLDFLAGS_ppc:-KCCFLAGS_ppc:+KCCFLAGS_ppc:=-fPIC
 
 KLDFLAGS_ppc64:= -melf64ppc -Bsymbolic
 KCCFLAGS_ppc64:= -mminimal-toc
diff -ur module-test-framework/mod.c module-test-framework-fixed/mod.c
--- module-test-framework/mod.c	2002-12-17 09:53:05.000000000 +1100
+++ module-test-framework-fixed/mod.c	2002-12-17 11:18:15.000000000 +1100
@@ -12,7 +12,6 @@
 extern int __initfn(void);
 extern void __exitfn(void);
 
-#if 0
 /* We use the linker to do a lot of this work for us. */
 struct module __this_module __attribute__((section("this_module"))) = {
 	.name = MODULE_NAME,
@@ -35,27 +34,3 @@
 	.exit = __exitfn,
 #endif
 };
-#else
-/* We use the linker to do a lot of this work for us. */
-struct module __this_module __attribute__((section("this_module"))) = {
-	.name = MODULE_NAME,
-	.symbols = { .owner = &__this_module,
-		     .start = __start___ksymtab,
-		     .end = __stop___ksymtab,
-	},
-	.extable = { .start = NULL,
-		     .end = NULL,
-	},
-	.param_start = __start___param,
-	.param_end = __stop___param,
-	.init = __initfn,
-	.cut_here = __module_cut,
-#ifdef CONFIG_OBSOLETE_MODPARM
-	.obsparam_start = NULL,
-	.obsparam_end = NULL,
-#endif
-#ifdef CONFIG_MODULE_UNLOAD
-	.exit = __exitfn,
-#endif
-};
-#endif 
diff -ur module-test-framework/module.c module-test-framework-fixed/module.c
--- module-test-framework/module.c	2002-12-17 09:53:56.000000000 +1100
+++ module-test-framework-fixed/module.c	2002-12-17 11:22:28.000000000 +1100
@@ -637,13 +637,12 @@
 	sechdrs = (void *)hdr + hdr->e_shoff;
 	secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
 	for (i = 1; i < hdr->e_shnum; i++) {
-		if (strcmp(secstrings+sechdrs[i].sh_name, ".strtab") = 0) {
-			DEBUGP("String table in section %u\n", i);
-			strtab = (void *)hdr + sechdrs[i].sh_offset;
-		} else if (sechdrs[i].sh_type = SHT_SYMTAB) {
+		if (sechdrs[i].sh_type = SHT_SYMTAB) {
 			/* Internal symbols */
 			DEBUGP("Symbol table in section %u\n", i);
 			symindex = i;
+			strtab = (void *)hdr
+				+ sechdrs[sechdrs[i].sh_link].sh_offset;
 		}
 	}
 
@@ -973,9 +972,6 @@
 		} else if (phdrs[i].p_type = PT_LINUX_MODULE)
 			me = loadaddr + phdrs[i].p_vaddr;
 	}
-#if 1
-	me = loadaddr + 0x00000084;
-#endif
 	if (!me) {
 		printk(KERN_ERR "load_module: No module found\n");
 		err = -ENOEXEC;


--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.


  parent reply	other threads:[~2002-12-17  0:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-16 23:22 [Linux-ia64] Re: ia64 cache flushing? Rusty Russell
2002-12-17  0:25 ` Richard Henderson
2002-12-17  0:27 ` Rusty Russell [this message]
2002-12-17  1:14 ` Rusty Russell
2002-12-17  1:32 ` Richard Henderson
2002-12-17  2:11 ` Rusty Russell
2002-12-17  2:15 ` David Mosberger
2002-12-17  3:42 ` Richard Henderson
2002-12-17  3:50 ` David Mosberger
2002-12-17  7:20 ` Richard Henderson
2002-12-19 23:15 ` David Mosberger
2002-12-20  0:56 ` Richard Henderson
2002-12-20  1:07 ` David Mosberger
2002-12-20  1:18 ` Richard Henderson
2002-12-20  1:20 ` David Mosberger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-ia64-105590709805584@msgid-missing \
    --to=rusty@rustcorp.com.au \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox