#ifdefined(CONFIG_HAVE_ARCH_PREL32_RELOCATIONS) /* * relative reference: this reduces the size by half on 64-bit architectures, * and eliminates the need for absolute relocations that require runtime * processing on relocatable kernels.
*/ #define __KSYM_ALIGN ".balign 4" #define __KSYM_REF(sym) ".long "#sym"- ." #elifdefined(CONFIG_64BIT) #define __KSYM_ALIGN ".balign 8" #define __KSYM_REF(sym) ".quad "#sym #else #define __KSYM_ALIGN ".balign 4" #define __KSYM_REF(sym) ".long "#sym #endif
/* * For every exported symbol, do the following: * * - Put the name of the symbol and namespace (empty string "" for none) in * __ksymtab_strings. * - Place a struct kernel_symbol entry in the __ksymtab section. * * Note on .section use: we specify progbits since usage of the "M" (SHF_MERGE) * section flag requires it. Use '%progbits' instead of '@progbits' since the * former apparently works on all arches according to the binutils source.
*/ #define __KSYMTAB(name, sym, sec, ns) \ asm(" .section \"__ksymtab_strings\",\"aMS\",%progbits,1""\n" \ "__kstrtab_"#name":""\n" \ " .asciz \"" #name "\"""\n" \ "__kstrtabns_"#name":""\n" \ " .asciz \"" ns "\"""\n" \ " .previous""\n" \ " .section \"___ksymtab" sec "+" #name "\", \"a\"""\n" \
__KSYM_ALIGN "\n" \ "__ksymtab_"#name":""\n" \
__KSYM_REF(sym) "\n" \
__KSYM_REF(__kstrtab_ ##name) "\n" \
__KSYM_REF(__kstrtabns_ ##name) "\n" \ " .previous""\n" \
)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.