sparc32 modpost warnings from init()
I am left with the warnings below in the sparc build of 2.6.19-rc2. They all originate from init() (init/main.c). This function should definitely remain in .text and it is fine it calls to .init.text functions.
The patch below against modpost makes it ignore this function, but I am not sure:
- if this is the correct solution
- if this code should be sparc-specific
Any input on how to get rid of these warnings is welcome.
WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_ksoftirqd from .text between 'init' (at offset 0xc07c) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:spawn_softlockup_task from .text between 'init' (at offset 0xc084) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:sched_init_smp from .text between 'init' (at offset 0xc08c) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:populate_rootfs from .text between 'init' (at offset 0xc094) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:usermodehelper_init from .text between 'init' (at offset 0xc0a4) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:driver_init from .text between 'init' (at offset 0xc0ac) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:sysctl_init from .text between 'init' (at offset 0xc0b4) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.data:initcall_debug from .text between 'init' (at offset 0xc0d4) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.data:initcall_debug from .text between 'init' (at offset 0xc0d8) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.data:initcall_debug from .text between 'init' (at offset 0xc114) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.data:initcall_debug from .text between 'init' (at offset 0xc194) and 'try_name'
WARNING: vmlinux - Section mismatch: reference to .init.text:prepare_namespace from .text between 'init' (at offset 0xc2e0) and 'try_name'
Martin
---
Index: 2.6.19-rc2/scripts/mod/modpost.c
=================================--- 2.6.19-rc2.orig/scripts/mod/modpost.c 2006-10-14 01:15:27.000000000 +0100
+++ 2.6.19-rc2/scripts/mod/modpost.c 2006-10-15 20:43:55.000000000 +0100
@@ -629,6 +629,11 @@
(strcmp(tosec, ".init.text") = 0))
return 1;
}
+
+ /* Whitelist all references from init() */
+ if (strncmp(atsym, "init", strlen("init")) = 0)
+ return 1;
+
return 0;
}
From: Martin Habets <[email protected]>
Date: Sun, 15 Oct 2006 21:05:47 +0100
Quoted 9 lines
I am left with the warnings below in the sparc build of 2.6.19-rc2. They all originate from
init()(init/main.c). This function should definitely remain in .text and it is fine it calls to .init.text functions.The patch below against modpost makes it ignore this function, but I am not sure:
- if this is the correct solution
- if this code should be sparc-specific
Any input on how to get rid of these warnings is welcome.
I don't know what to make of this :-)
On the one hand we do indeed need to keep init() in .text because init memory is released before the init thread exec()'s, but on the other hand filtering init() specially in modpost is a little bit hackish.
But if Sam has no problem with this change, I'm not going to object either. Sam?