From: Linus Torvalds <[email protected]>
Date: Wed, 23 Nov 2005 15:29:53 -0800 (PST)
> Add a new "__smp_only__" thing, and do something like
>
> #ifdef CONFIG_SMP
> #define __smp_only__
> #else
> #define __smp_only \
> __attribute__((__unused__, section("discard")))
> #endif
>
> (Yeah, I didn't look up the section syntax, because I'm lazy, but you get
> the point - put it explicitly in some section that will be thrown away,
> and that we can make the build-checking tools verify isn't linked to).
If we mark it correctly, the linker will not even try to link it in to
the final object, and we'll get a flat out link failure.
Yes, something like this would be great.
-
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/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]