[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100726072350.GA10061@merkur.ravnborg.org>
Date: Mon, 26 Jul 2010 09:23:50 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Denys Vlasenko <vda.linux@...glemail.com>
Cc: Tim Abbott <tabbott@...lice.com>, Tim Bird <tim.bird@...sony.com>,
James Bottomley <James.Bottomley@...senpartnership.com>,
linux-kernel@...r.kernel.org,
Matt Fleming <matt@...sole-pimps.org>,
linux-arch@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
Michal Marek <mmarek@...e.cz>,
Parisc List <linux-parisc@...r.kernel.org>
Subject: Re: Testing of function/data-sections on linux-2.6.35-rc4
On Mon, Jul 26, 2010 at 02:52:57AM +0200, Denys Vlasenko wrote:
> On Friday 23 July 2010 21:10, Sam Ravnborg wrote:
> > >
> > > * modpost fix for 64k+ sections: linux-2.6.35-rc4-fs.modpost.patch
> > > This patch is in -mm, it still not reach mainline...
> > >
> >
> > Some comments below - but noting fundamental.
> >
> > + /* Fixup for more than 64k sections */
> > + info->num_sections = hdr->e_shnum;
> > + if (info->num_sections == 0) { /* more than 64k sections? */
> > + /* note: it doesn't need shndx2secindex() */
> > + info->num_sections = TO_NATIVE(sechdrs[0].sh_size);
> > + }
> > I had to read the above twice to get it.
> > How about something like this:
> >
> > /* Fixup for more than 64k sections */
> > if (hdr->e_shnum == 0) {
> > /*
> > * There are more than 64k sections,
> > * read count from .sh_size.
> > * note: it doesn't need shndx2secindex()
> > */
> > info->num_sections = TO_NATIVE(sechdrs[0].sh_size);
> > }
> > else {
> > info->num_sections = hdr->e_shnum;
> > }
> >
> >
> > + info->secindex_strings = hdr->e_shstrndx;
> > + if (info->secindex_strings == SHN_XINDEX)
> > + info->secindex_strings =
> > + shndx2secindex(TO_NATIVE(sechdrs[0].sh_link));
> >
> > Likewise here...
>
> Done both.
>
> ...
> > - for (i = 1; i < hdr->e_shnum; i++) {
> > - const char *secstrings
> > - = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> > + secstrings = (void *)hdr + sechdrs[info->secindex_strings].sh_offset;
> >
> > Moving this assignnet out of the loop is an unrelated
> > but welcome change.
>
> I take you are ok with it?
>
> Please find updated patch below.
>
> Signed-off-by: Denys Vlasenko <vda.linux@...glemail.com>
If the patch get a proper changelog then it has my:
Acked-by: Sam Ravnborg <sam@...nborg.org>
Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists