2

Noticed in our makefiles EXPORT_SYMTAB is used as described in here.

Is it still relevant to 2.6 and above kernels? I can not find reference what it's current status, but can't find it in LXR.

dimba
  • 26,717
  • 34
  • 141
  • 196

2 Answers2

3

The EXPORT_SYMTAB name per se seems to be gone once and for all since 2.6 kernels. However, the related macro EXPORT_SYMTAB_STROPS seems to have still a small relevance for what concerns SPARC architectures as explained here. Quoting directly from the mailing list:

> given that EXPORT_SYMTAB was removed from the kernel tree quite some
> time back, is this related macro still doing anything useful? just
> asking.

It's only used by sparc so that it can export symbols like memcpy(), memset() et al. properly

Without this ifdef protection while building ksyms.c, string*.h will define these functions as macros, and that makes things like:

EXPORT_SYMBOL(memcpy)

and similar not work because memcpy will macro expand and thus break the build with syntax errors.

EXPORT_SYMTAB_STROPS macros are still present in 3.4.9 kernel.

#> find . \( -name '*.c' -o -name '*.h' \) -exec grep -inH EXPORT_SYMTAB {} \;
./arch/sparc/lib/ksyms.c:6:#define EXPORT_SYMTAB_STROPS
./arch/sparc/include/asm/string_64.h:18:#ifndef EXPORT_SYMTAB_STROPS
./arch/sparc/include/asm/string_64.h:58:#endif /* !EXPORT_SYMTAB_STROPS */
./arch/sparc/include/asm/string_32.h:20:#ifndef EXPORT_SYMTAB_STROPS
./arch/sparc/include/asm/string_32.h:127:#endif /* !EXPORT_SYMTAB_STROPS */
Flexo
  • 87,323
  • 22
  • 191
  • 272
Avio
  • 2,700
  • 6
  • 30
  • 50
2

Could not find any direct reference. Found following commits in 2.6 kernel though..

commit fe4f699c6fb886a8deaf1120fd52402c3bd7c459
Author: Robert P. J. Day <rpjday@crashcourse.ca>
Date:   Sun Jul 5 05:19:29 2009 -0400

    Staging: vt6655: Remove Makefile refs to EXPORT_SYMTAB

    Given that EXPORT_SYMTAB was removed long ago, remove the Makefile
    references to it.

    Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


commit 1fad810473423bbf0626fab2fbeb27a4663fa2d5
Author: Adrian Bunk <bunk@stusta.de>
Date:   Sat Jul 30 12:49:56 2005 -0700

    [PATCH] hostap update

    EXPORT_SYMTAB does nothing. There's no need to define something if it
    doesn't have any effect.

    Signed-off-by: Adrian Bunk <bunk@stusta.de>
    Signed-off-by: Jouni Malinen <jkmaline@cc.hut.fi>
    Signed-off-by: Jeff Garzik <jgarzik@pobox.com>

This points that EXPORT_SYMTAB is not used anymore.

Minto Joseph
  • 146
  • 1
  • 5