diff options
| author | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:32:43 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@athlon.transmeta.com> | 2002-02-04 20:32:43 -0800 |
| commit | a8a2069f432c5597bdf9c83ab3045b9ef32ab5e3 (patch) | |
| tree | 06d1047415e70b9a6cbd0567ae1202433530dd46 /include/linux/module.h | |
| parent | 5db5272c0a5cd37e5a697e4750fbc4ce6317b7dc (diff) | |
v2.4.14.1 -> v2.4.14.2
- Ivan Kokshaysky: fix alpha dec_and_lock with modules, for alpha config entry
- Kai Germaschewski: ISDN updates
- Jeff Garzik: network driver updates, sysv fs update
- Kai Mäkisara: SCSI tape update
- Alan Cox: large drivers merge
- Nikita Danilov: reiserfs procfs information
- Andrew Morton: ext3 merge
- Christoph Hellwig: vxfs livelock fix
- Trond Myklebust: NFS updates
- Jens Axboe: cpqarray + cciss dequeue fix
- Tim Waugh: parport_serial base_baud setting
- Matthew Dharm: usb-storage Freecom driver fixes
- Dave McCracken: wait4() thread group race fix
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index 9efd6da5d3ff..e554242553a6 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -257,8 +257,6 @@ static const unsigned long __module_##gtype##_size \ __attribute__ ((unused)) = sizeof(struct gtype##_id); \ static const struct gtype##_id * __module_##gtype##_table \ __attribute__ ((unused)) = name -#define MODULE_DEVICE_TABLE(type,name) \ - MODULE_GENERIC_TABLE(type##_device,name) /* * The following license idents are currently accepted as indicating free @@ -312,8 +310,15 @@ static const char __module_using_checksums[] __attribute__((section(".modinfo")) #define MODULE_SUPPORTED_DEVICE(name) #define MODULE_PARM(var,type) #define MODULE_PARM_DESC(var,desc) -#define MODULE_GENERIC_TABLE(gtype,name) -#define MODULE_DEVICE_TABLE(type,name) + +/* Create a dummy reference to the table to suppress gcc unused warnings. Put + * the reference in the .data.exit section which is discarded when code is built + * in, so the reference does not bloat the running kernel. Note: cannot be + * const, other exit data may be writable. + */ +#define MODULE_GENERIC_TABLE(gtype,name) \ +static struct gtype##_id * __module_##gtype##_table \ + __attribute__ ((unused, __section__(".data.exit"))) = name #ifndef __GENKSYMS__ @@ -328,6 +333,9 @@ extern struct module *module_list; #endif /* MODULE */ +#define MODULE_DEVICE_TABLE(type,name) \ + MODULE_GENERIC_TABLE(type##_device,name) + /* Export a symbol either from the kernel or a module. In the kernel, the symbol is added to the kernel's global symbol table. |
