* Linus Torvalds <[EMAIL PROTECTED]> wrote: > Ingo, Thomas, > should we not do this? > > Otherwise, it seems we generate a section that isn't allocated? > > I think toolchain should add the right flags automatically for > sections that start with ".[ro]data" and ".text", but not for the > kernel-specific ".init.*" sections.
> #ifndef CONFIG_HOTPLUG_CPU > - .pushsection .init.data > + .pushsection .init.data,"aw" > #endif hm, did you get linker errors due to an unallocated section discarded from the vmlinux? Sam says that forgetting the "aw" attribute means it's .init.data.1, so the standard vmlinux.lds rule does not pick it up: .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) { _sinittext = .; INIT_TEXT _einittext = .; } as INIT_TEXT is defined as: #define INIT_TEXT \ *(.init.text) \ which wouldnt pick up .init.text.1, and the linker would thus discard the section? i'm wondering whether it's possible to add a wildcard, something like this: #define INIT_TEXT \ *(.init.text*) \ ? That way even if we forget the attribute, it gets picked up. Ingo -- 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/