* kernel modules
@ 2003-10-20 14:32 David Kesselring
2003-10-20 15:48 ` David Daney
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: David Kesselring @ 2003-10-20 14:32 UTC (permalink / raw)
To: linux-mips
Can someone please confirm that loading and unloading of kernel modules is
functioning in the 2.4 release?
When I try to load a wlan module that I compiled (with mipsel-*) I get
relocation errors. I used the same options as I did to compile the kernel
(for MIPS Malta board). If you have any ideas, please let me know.
David Kesselring
Atmel MMC
dkesselr@mmc.atmel.com
919-462-6587
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel modules
2003-10-20 14:32 kernel modules David Kesselring
@ 2003-10-20 15:48 ` David Daney
2003-10-20 18:13 ` David Daney
2003-10-20 18:39 ` Ralf Baechle
2 siblings, 0 replies; 6+ messages in thread
From: David Daney @ 2003-10-20 15:48 UTC (permalink / raw)
To: David Kesselring; +Cc: linux-mips
David Kesselring wrote:
>Can someone please confirm that loading and unloading of kernel modules is
>functioning in the 2.4 release?
>
>When I try to load a wlan module that I compiled (with mipsel-*) I get
>relocation errors. I used the same options as I did to compile the kernel
>(for MIPS Malta board). If you have any ideas, please let me know.
>
>
>
Works for me.
Using gcc 3.3.1 to compile modules, I had to upgrade to modutils-2.4.25
and apply this patch to them:
On Thu, 16 Oct 2003 14:09:24 -0700,
David Daney <ddaney@avtrex.com> wrote:
>>Anyhow, I encountered a small problem trying to load a module compiled
>>with gcc-3.3.1. The module has dwarf debugging info and could not be
>>loaded by insmod. This patch causes MIPS_DWARF sections to be treated
>>in the same manner as MIPS_DEBUG sections.
>>
>>Also there was a fall through in the case statement that caused error
>>messages to be printed twice for "Unhandled section header type".
>
>
Thanks. I already have an equivalent patch in my development tree
(from Alvaro Martinez Echevarria). It is waiting for me to get some
time to release modutils 2.4.26.
Index: 25.5/obj/obj_mips.c
--- 25.5/obj/obj_mips.c Fri, 01 Mar 2002 11:39:06 +1100 kaos (modutils-2.4/c/10_obj_mips.c 1.4 644)
+++ 26.2(w)/obj/obj_mips.c Sat, 05 Apr 2003 08:36:33 +1000 kaos (modutils-2.4/c/10_obj_mips.c 1.5 644)
@@ -74,7 +74,8 @@ arch_load_proc_section(struct obj_sectio
{
case SHT_MIPS_DEBUG:
case SHT_MIPS_REGINFO:
- /* Actually these two sections are as useless as something can be ... */
+ case SHT_MIPS_DWARF:
+ /* Ignore debugging sections */
sec->contents = NULL;
break;
@@ -83,10 +84,10 @@ arch_load_proc_section(struct obj_sectio
case SHT_MIPS_GPTAB:
case SHT_MIPS_UCODE:
case SHT_MIPS_OPTIONS:
- case SHT_MIPS_DWARF:
case SHT_MIPS_EVENTS:
/* These shouldn't ever be in a module file. */
error("Unhandled section header type: %08x", sec->header.sh_type);
+ return -1;
default:
/* We don't even know the type. This time it might as well be a
David Daney
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel modules
2003-10-20 14:32 kernel modules David Kesselring
2003-10-20 15:48 ` David Daney
@ 2003-10-20 18:13 ` David Daney
2003-10-20 18:39 ` Ralf Baechle
2 siblings, 0 replies; 6+ messages in thread
From: David Daney @ 2003-10-20 18:13 UTC (permalink / raw)
To: David Kesselring; +Cc: linux-mips
David Kesselring wrote:
>Can someone please confirm that loading and unloading of kernel modules is
>functioning in the 2.4 release?
>
>When I try to load a wlan module that I compiled (with mipsel-*) I get
>relocation errors. I used the same options as I did to compile the kernel
>(for MIPS Malta board). If you have any ideas, please let me know.
>
>
>
Modules also require compiling with -mlong-calls in addition to the
"normal" kernel options.
David Daney.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel modules
2003-10-20 14:32 kernel modules David Kesselring
2003-10-20 15:48 ` David Daney
2003-10-20 18:13 ` David Daney
@ 2003-10-20 18:39 ` Ralf Baechle
2003-10-20 21:00 ` Zhang Haitao
2 siblings, 1 reply; 6+ messages in thread
From: Ralf Baechle @ 2003-10-20 18:39 UTC (permalink / raw)
To: David Kesselring; +Cc: linux-mips
On Mon, Oct 20, 2003 at 10:32:08AM -0400, David Kesselring wrote:
> Can someone please confirm that loading and unloading of kernel modules is
> functioning in the 2.4 release?
>
> When I try to load a wlan module that I compiled (with mipsel-*) I get
> relocation errors. I used the same options as I did to compile the kernel
> (for MIPS Malta board). If you have any ideas, please let me know.
You're _not_ using the same options as the kernel's Makefile does for
building modules.
Ralf
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel modules
2003-10-20 18:39 ` Ralf Baechle
@ 2003-10-20 21:00 ` Zhang Haitao
2003-10-21 12:34 ` David Kesselring
0 siblings, 1 reply; 6+ messages in thread
From: Zhang Haitao @ 2003-10-20 21:00 UTC (permalink / raw)
To: David Kesselring; +Cc: linux-mips
On Mon, Oct 20, Ralf Baechle wrote:
>
>
> You're _not_ using the same options as the kernel's Makefile does for
> building modules.
>
> Ralf
>
Hi, modules compiled using these parameters are working on my 2.4.21 SMP
kernel:
CFLAGS="-I .../include/asm/gcc -D__KERNEL__ -I.../include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -G 0 -mno-abicalls -fno-pic -mcpu=XX
-mips2 -Wa,--trap -pipe -DMODULE -mlong-calls"
XX = your chip style
Zhang Haitao
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: kernel modules
2003-10-20 21:00 ` Zhang Haitao
@ 2003-10-21 12:34 ` David Kesselring
0 siblings, 0 replies; 6+ messages in thread
From: David Kesselring @ 2003-10-21 12:34 UTC (permalink / raw)
To: Zhang Haitao; +Cc: linux-mips
Thanks for your responses. I will try your suggestions.
David Kesselring
Atmel MMC
dkesselr@mmc.atmel.com
919-462-6587
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-21 12:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-20 14:32 kernel modules David Kesselring
2003-10-20 15:48 ` David Daney
2003-10-20 18:13 ` David Daney
2003-10-20 18:39 ` Ralf Baechle
2003-10-20 21:00 ` Zhang Haitao
2003-10-21 12:34 ` David Kesselring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox