History

debugobjects: Section mismatch cleanup

This patch marks two functions, which only get called at initialization, as __init. Here is also interesting, that modpost doesn't catch here the right function name. WARNING: lib/built-in.o(.text+0x585f): Section mismatch in reference from the function T.506() to the variable .init.data:obj The function T.506() references the variable __initdata obj. This is often because T.506 lacks a __initdata annotation or the annotation of obj is wrong.

Henrik Kretzschmar committed 16 years ago

Commit 1fb2f771 parent 220bf991 file · +2 −2Browse files

Showing the changes to lib/debugobjects.c (1 of 1 file). Show all

Unified · Split

lib/debugobjects.c+2−2
@@ -773,7 +773,7 @@ static int __init fixup_free(void *addr, enum debug_obj_state state) · 772 unmodified lines
773773 }
774774 }
775775
776−static int
776+static int __init
777777 check_results(void *addr, enum debug_obj_state state, int fixups, int warnings)
778778 {
779779 struct debug_bucket *db;
@@ -916,7 +916,7 @@ void __init debug_objects_early_init(void) · 136 unmodified lines
916916 /*
917917 * Convert the statically allocated objects to dynamic ones:
918918 */
919−static int debug_objects_replace_static_objects(void)
919+static int __init debug_objects_replace_static_objects(void)
920920 {
921921 struct debug_bucket *db = obj_hash;
922922 struct hlist_node *node, *tmp;