asm-generic: export: Stub EXPORT_SYMBOL with __DISABLE_EXPORTS
[linux-2.6-microblaze.git] / include / asm-generic / export.h
index afddc54..07a36a8 100644 (file)
 .endm
 
 /*
- * note on .section use: @progbits vs %progbits nastiness doesn't matter,
- * since we immediately emit into those sections anyway.
+ * 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.
  */
+
 .macro ___EXPORT_SYMBOL name,val,sec
-#ifdef CONFIG_MODULES
+#if defined(CONFIG_MODULES) && !defined(__DISABLE_EXPORTS)
        .section ___ksymtab\sec+\name,"a"
        .balign KSYM_ALIGN
 __ksymtab_\name:
        __put \val, __kstrtab_\name
        .previous
-       .section __ksymtab_strings,"a"
+       .section __ksymtab_strings,"aMS",%progbits,1
 __kstrtab_\name:
        .asciz "\name"
        .previous