aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2009-06-18 16:38:59 +0200
committerJon Masters <jcm@jonmasters.org>2009-06-23 03:57:02 -0400
commitf4aab0ffafdd2cb09d3510cc594c8ae73dda4ece (patch)
tree152892930a741a158ef3048bc94f3da5b7f7c756
parent9ded2725bf85c782cdceb078dd61b31f2cecb5c7 (diff)
downloadmodule-init-tools-f4aab0ffafdd2cb09d3510cc594c8ae73dda4ece.tar.gz
elfops: clean up load_symbols()
__ksymtab_strings_gpl must have been a mistake, there has never been such section. __ksymtab_strings is present since 2.5.59, so get rid of the compatibility code. Signed-off-by: Michal Marek <mmarek@suse.cz> Signed-off-by: Jon Masters <jcm@jonmasters.org>
-rw-r--r--elfops.h10
-rw-r--r--elfops_core.c25
2 files changed, 3 insertions, 32 deletions
diff --git a/elfops.h b/elfops.h
index c3d2e33..2921e52 100644
--- a/elfops.h
+++ b/elfops.h
@@ -6,16 +6,6 @@
/* All the icky stuff to do with manipulating 64 and 32-bit modules
belongs here. */
-struct kernel_symbol32 {
- char value[4];
- char name[64 - 4];
-};
-
-struct kernel_symbol64 {
- char value[8];
- char name[64 - 8];
-};
-
struct modver_info32
{
uint32_t crc;
diff --git a/elfops_core.c b/elfops_core.c
index c5e84ba..ced374e 100644
--- a/elfops_core.c
+++ b/elfops_core.c
@@ -102,29 +102,10 @@ static struct string_table *PERBIT(load_strings)(struct elf_file *module,
static struct string_table *PERBIT(load_symbols)(struct elf_file *module)
{
- struct PERBIT(kernel_symbol) *ksyms;
- struct string_table *symtbl;
- unsigned long i, size;
-
- symtbl = NULL;
-
- /* New-style: strings are in this section. */
- symtbl = PERBIT(load_strings)(module, "__ksymtab_strings", symtbl, fatal);
- if (symtbl) {
- /* GPL symbols too */
- return PERBIT(load_strings)(module, "__ksymtab_strings_gpl",
- symtbl, fatal);
- }
-
- /* Old-style. */
- ksyms = PERBIT(load_section)(module, "__ksymtab", &size);
- for (i = 0; i < size / sizeof(struct PERBIT(kernel_symbol)); i++)
- symtbl = NOFAIL(strtbl_add(ksyms[i].name, symtbl));
- ksyms = PERBIT(load_section)(module, "__gpl_ksymtab", &size);
- for (i = 0; i < size / sizeof(struct PERBIT(kernel_symbol)); i++)
- symtbl = NOFAIL(strtbl_add(ksyms[i].name, symtbl));
+ struct string_table *symtbl = NULL;
- return symtbl;
+ return PERBIT(load_strings)(module, "__ksymtab_strings", symtbl,
+ fatal);
}
static char *PERBIT(get_aliases)(struct elf_file *module, unsigned long *size)