kernel: 2.6.32: move discarding of SYMTAB entries to the right place.

This helps to avoid linker errors on various targets. Also remove the
scsi_sd section fix patch, because it is not needed now.

SVN-Revision: 19583
This commit is contained in:
Gabor Juhos 2010-02-11 13:31:40 +00:00
parent 03779da9c6
commit 6960d7c8db
2 changed files with 11 additions and 18 deletions

View file

@ -69,21 +69,25 @@
VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \ VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .; \
} \ } \
\ \
@@ -323,7 +344,13 @@ @@ -323,7 +344,7 @@
\ \
/* Kernel symbol table: strings */ \ /* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \ __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
- *(__ksymtab_strings) \ - *(__ksymtab_strings) \
+ SYMTAB_KEEP_STR \ + SYMTAB_KEEP_STR \
+ } \
+ \
+ /DISCARD/ : { \
+ SYMTAB_DISCARD \
+ SYMTAB_DISCARD_GPL \
+ SYMTAB_DISCARD_STR \
} \ } \
\ \
/* __*init sections */ \ /* __*init sections */ \
@@ -638,6 +659,9 @@
EXIT_TEXT \
EXIT_DATA \
EXIT_CALL \
+ SYMTAB_DISCARD \
+ SYMTAB_DISCARD_GPL \
+ SYMTAB_DISCARD_STR \
*(.discard) \
}
--- a/include/linux/module.h --- a/include/linux/module.h
+++ b/include/linux/module.h +++ b/include/linux/module.h
@@ -192,16 +192,24 @@ void *__symbol_get_gpl(const char *symbo @@ -192,16 +192,24 @@ void *__symbol_get_gpl(const char *symbo

View file

@ -1,11 +0,0 @@
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2394,7 +2394,7 @@ err_out:
*
* Note: this function unregisters this driver from the scsi mid-level.
**/
-static void __exit exit_sd(void)
+static void exit_sd(void)
{
int i;