LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Question about EXPORT_SYMBOL implementation
@ 2007-02-09 16:07 Francis Moreau
  0 siblings, 0 replies; only message in thread
From: Francis Moreau @ 2007-02-09 16:07 UTC (permalink / raw)
  To: linux-kernel

Hi,

Here is the implementation of EXPORT_SYMBOL:

#define __EXPORT_SYMBOL(sym, sec)                               \
        extern typeof(sym) sym;                                 \
        __CRC_SYMBOL(sym, sec)                                  \
        static const char __kstrtab_##sym[]                     \
        __attribute__((section("__ksymtab_strings")))           \
        = MODULE_SYMBOL_PREFIX #sym;                            \
        static const struct kernel_symbol __ksymtab_##sym       \
        __attribute_used__                                      \
        __attribute__((section("__ksymtab" sec), unused))       \
        = { (unsigned long)&sym, __kstrtab_##sym }


I'm wondering why it's using '__attribute_used__' _and_
'__attribute__((section("__ksymtab" sec), unused)'. Isn't the unused
attribute redundant with '__attribute_used__' ?

thanks
-- 
Francis

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-09 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-09 16:07 Question about EXPORT_SYMBOL implementation Francis Moreau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).