Re: question about arch/parisc/kernel/module.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 4 Aug 2009, Kyle McMartin wrote:

> On Tue, Aug 04, 2009 at 09:43:57PM +0200, Julia Lawall wrote:
> > 	for (i = 1; i < hdr->e_shnum; i++) {
> >                 if(sechdrs[i].sh_type == SHT_SYMTAB
> >                    && (sechdrs[i].sh_type & SHF_ALLOC)) {
> > 	                int strindex = sechdrs[i].sh_link;
> > 			/* FIXME: AWFUL HACK
> > 	                 * The cast is to drop the const from
> >                          * the sechdrs pointer */
> >                         symhdr = (Elf_Shdr *)&sechdrs[i];
> >                         strtab = (char *)sechdrs[strindex].sh_addr;
> > 	                break;
> > 	        }
> >         }
> > 
> > The third line, (sechdrs[i].sh_type & SHF_ALLOC), loos suspicious, because 
> > actually SHT_SYMTAB and SHF_ALLOC have the same value.  Should the third 
> > line be (sechdrs[i].sh_flags & SHF_ALLOC) instead?
> > 
> 
> Yup, you're quite right. Could you submit a patch, please?

Yes, I will do that shortly.

julia
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux