diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-07-29 01:47:53 +0200 |
---|---|---|
committer | Michal Marek <mmarek@suse.cz> | 2010-08-03 15:05:56 +0200 |
commit | 1ce53adf13a54375d2a5c7cdbe341b2558389615 (patch) | |
tree | ebd9f596daa9cdbf3eca2f964e2f58946d4b4d16 /scripts/mod/file2alias.c | |
parent | 4696e2958b345189afebcb52e365d16ca6e403ef (diff) | |
download | kernel_samsung_espresso10-1ce53adf13a54375d2a5c7cdbe341b2558389615.zip kernel_samsung_espresso10-1ce53adf13a54375d2a5c7cdbe341b2558389615.tar.gz kernel_samsung_espresso10-1ce53adf13a54375d2a5c7cdbe341b2558389615.tar.bz2 |
modpost: support objects with more than 64k sections
This patch makes modpost able to process object files with more than
64k sections. Needed for huge kernel builds (allyesconfig, for example)
with -ffunction-sections. 64k sections handling is covered, for example,
by this document:
"IA-64 gABI Proposal 74: Section Indexes"
http://www.codesourcery.com/public/cxx-abi/abi/prop-74-sindex.html
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 220213e..33f4363 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -839,16 +839,16 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, char *zeros = NULL; /* We're looking for a section relative symbol */ - if (!sym->st_shndx || sym->st_shndx >= info->hdr->e_shnum) + if (!sym->st_shndx || get_secindex(info, sym) >= info->num_sections) return; /* Handle all-NULL symbols allocated into .bss */ - if (info->sechdrs[sym->st_shndx].sh_type & SHT_NOBITS) { + if (info->sechdrs[get_secindex(info, sym)].sh_type & SHT_NOBITS) { zeros = calloc(1, sym->st_size); symval = zeros; } else { symval = (void *)info->hdr - + info->sechdrs[sym->st_shndx].sh_offset + + info->sechdrs[get_secindex(info, sym)].sh_offset + sym->st_value; } |