From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4) Date: Thu, 1 Jan 2009 00:02:40 +1030 Message-ID: <200901010002.41477.rusty@rustcorp.com.au> References: <4959346E.7060600@gmx.de> <200812310915.41693.rusty@rustcorp.com.au> <495B5806.3080505@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Cc: "linux-parisc" , Linux Kernel Development , Kyle McMartin , Randolph Chung , Linus , Andrew Morton , Sam Ravnborg , John David Anglin To: Helge Deller Return-path: In-Reply-To: <495B5806.3080505@gmx.de> List-ID: List-Id: linux-parisc.vger.kernel.org On Wednesday 31 December 2008 22:01:18 Helge Deller wrote: > +/* Additional bytes needed by arch in front of individual sections */ > +unsigned int arch_module_section_size(struct module *mod, > + unsigned int section); > + ... > +/* Additional bytes needed by arch in front of individual sections */ > +unsigned int __attribute__ ((weak)) arch_module_section_size( > + struct module *mod, unsigned int section) > +{ > + /* default implementation just returns zero */ > + return 0; > +} Not quite what I had in mind... let me show you: /* Bytes needed for a section: default is just the section size. */ unsigned int __attribute__((weak)) arch_module_section_size(struct module *mod, Elf_Shdr *sechdrs, unsigned int sec) { return sechdrs[sec].sh_size; } Otherwise I'd have called it "arch_module_extra_size()". Cheers, Rusty.