question about arch/parisc/kernel/module.c

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

 



The file arch/parisc/kernel/module.c in the function module_finalize 
contains the following code:

	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?

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