lkml.org 
[lkml]   [2004]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] 2.6 && module + -g && kernel w/o -g
On Wed, Jan 14, 2004 at 02:23:29PM -0800, David Mosberger wrote:
> >>>>> On Wed, 14 Jan 2004 14:09:37 -0700, Tom Rini <trini@kernel.crashing.org> said:
>
> Tom> The following patch fixes the problem for me on PPC32:
>
> Tom> --- 1.96/kernel/module.c Wed Jan 7 22:46:59 2004
> Tom> +++ edited/kernel/module.c Wed Jan 14 14:05:12 2004
> Tom> @@ -1439,6 +1439,13 @@
> Tom> strindex = sechdrs[i].sh_link;
> Tom> strtab = (char *)hdr + sechdrs[strindex].sh_offset;
> Tom> }
> Tom> +
> Tom> + /* If we find any debug RELAs, frob these away now. */
> Tom> + if (sechdrs[i].sh_type == SHT_RELA &&
> Tom> + (strstr(secstrings+sechdrs[i].sh_name, ".debug")
> Tom> + != 0))
> Tom> + sechdrs[i].sh_type = SHT_NULL;
> Tom> +
> Tom> #ifndef CONFIG_MODULE_UNLOAD
> Tom> /* Don't load .exit sections */
> Tom> if (strncmp(secstrings+sechdrs[i].sh_name, ".exit", 5) == 0)
>
> Tom> IMHO, this shouldn't be covered under a PPC32 test since at
> Tom> least PPC32, PPC64 and Alpha have this issue, and I suspect
> Tom> that ia64, parisc, s390 and v850 have the problem as well
> Tom> (based on what their module_arch_frob bits look to be doing).
>
> As far as ia64 is concerned, adding a check for .debug should be OK,
> but since the debug sections do not have any relocs anyhow, it
> shouldn't make much of a difference one way or another (addresses in
> the debug section a segment-relative).

OK, I wasn't sure. I just did a real quick skim of everyones module.c
to see if they did any for loops and checking of SHT_RELA.

--
Tom Rini
http://gate.crashing.org/~trini/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.044 / U:2.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site