mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
module: reduce module image and resident size
Resulting reduction (x86-64, gcc 4.1.2) with my (special purpose, i.e. much reduced) configurations: - 16k kernel resident size - 180k module resident size - 10k module image size Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
a58730c421
commit
ea01e798e2
2 changed files with 3 additions and 2 deletions
|
@ -1828,8 +1828,9 @@ static struct module *load_module(void __user *umod,
|
|||
unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME);
|
||||
#endif
|
||||
|
||||
/* Don't keep modinfo section */
|
||||
/* Don't keep modinfo and version sections. */
|
||||
sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
|
||||
sechdrs[versindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
|
||||
#ifdef CONFIG_KALLSYMS
|
||||
/* Keep symbol and string tables for decoding later. */
|
||||
sechdrs[symindex].sh_flags |= SHF_ALLOC;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue