~ubuntu-core-dev/module-init-tools/ubuntu

« back to all changes in this revision

Viewing changes to tests/data/src/export_nodep.c

  • Committer: Scott James Remnant
  • Date: 2009-07-16 15:24:17 UTC
  • mfrom: (152.1.38)
  • Revision ID: scott@netsplit.com-20090716152417-7ak1sklxb59cs4fz
MergeĀ 3.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* A module exporting two symbols, and requiring none.  New-style */
2
 
#define MODULE_NAME_LEN (64 - sizeof(unsigned long))
3
 
struct kernel_symbol
4
 
{
5
 
        unsigned long value;
6
 
        const char *name;
7
 
};
8
 
 
9
 
#define EXPORT_SYMBOL(sym)                                      \
10
 
        const char __ksymtab_string_##sym[]                     \
11
 
        __attribute__((section("__ksymtab_strings"))) = #sym;   \
12
 
        const struct kernel_symbol __ksymtab_##sym              \
13
 
        __attribute__((section("__ksymtab")))                   \
14
 
        = { (unsigned long)&sym, __ksymtab_string_##sym }
 
1
/* A module exporting two symbols, and requiring none. */
 
2
#include "module.h"
15
3
 
16
4
int exported1, exported2;
17
5