Skip to contentSkip to conversation

2.5.8-pre3 linking error

DISCUSSION Udo A. Steinberg 4 participants 4 messages Apr 10, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

2.5.8-pre3 fails to link here:

init/main.o: In function `start_kernel':
init/main.o(.text.init+0x681): undefined reference to `setup_per_cpu_areas'

-Udo.

#1 lore raw
Quoted 9 lines · Udo A. Steinberg

Hi,

2.5.8-pre3 fails to link here:

init/main.o: In function `start_kernel':
init/main.o(.text.init+0x681): undefined reference to `setup_per_cpu_areas'

(quoted diff) +0 -2
-Udo.
-
Quoted 5 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

As you could see a few lines above setup_per_cpu_areas gets defined only of CONFIG_SMP is set. So find the line in the function start_kernel in init/main.c ( about line #320 IIRC ) where setup_per_cpu_areas gets called and put #ifdef CONFIG_SMP and #endif around it.

Cheers,
Todor

#2 lore raw
In reply to Udo A. Steinberg
Quoted 5 lines · Udo A. Steinberg

2.5.8-pre3 fails to link here:

init/main.o: In function `start_kernel':
init/main.o(.text.init+0x681): undefined reference to `setup_per_cpu_areas'

Apply this:

===== init/main.c 1.39 vs edited =====

init/main.c +4 -0
@@ -271,6 +271,10 @@
 #define smp_init()	do { } while (0)
 #endif
 
+static inline void setup_per_cpu_areas(void)
+{
+}
+
 #else
 
 #ifdef __GENERIC_PER_CPU
Signature · 2 lines
Stelian Pop <[email protected]>
Alcove - http://www.alcove.com
#3 lore raw
In reply to Udo A. Steinberg
Quoted 7 lines · Udo A. Steinberg

Hi,

2.5.8-pre3 fails to link here:

init/main.o: In function `start_kernel':
init/main.o(.text.init+0x681): undefined reference to `setup_per_cpu_areas'

Rusty patch deleted setup_per_cpu_areas() for the UP case. The patch below simply adds it again.

Gerd

===== main.c 1.39 vs edited =====

main.c renamed from init/main.c +3 -1
@@ -270,7 +270,9 @@
 #else
 #define smp_init()	do { } while (0)
 #endif
-
+static inline void setup_per_cpu_areas(void)
+{
+}
 #else
 
 #ifdef __GENERIC_PER_CPU