Skip to contentSkip to conversation

arch/parisc: correct use of SHF_ALLOC

PATCH In review Julia Lawall 3 participants 4 messages Aug 4, 2009 – Sep 28, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/parisc: correct use of SHF_ALLOC

From: Julia Lawall <[email protected]>

SHF_ALLOC is suitable for testing against the sh_flags field, not the sh_type field.

---
 arch/parisc/kernel/module.c         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/parisc/kernel/module.c +1 -1
index ef5caf2..c904817 100644
@@ -853,7 +853,7 @@ int module_finalize(const Elf_Ehdr *hdr,
 	 * ourselves */
 	for (i = 1; i < hdr->e_shnum; i++) {
 		if(sechdrs[i].sh_type = SHT_SYMTAB
-		   && (sechdrs[i].sh_type & SHF_ALLOC)) {
+		   && (sechdrs[i].sh_flags & SHF_ALLOC)) {
 			int strindex = sechdrs[i].sh_link;
 			/* FIXME: AWFUL HACK
 			 * The cast is to drop the const from
#2 lore raw
In reply to Julia Lawall

Hi Kyle,

I noticed today that this change is not in 2.6.31.1.

Dave

Quoted 28 lines · Julia Lawall

From: Julia Lawall <[email protected]>

SHF_ALLOC is suitable for testing against the sh_flags field, not the sh_type field.

---
 arch/parisc/kernel/module.c         |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/parisc/kernel/module.c +1 -2
index ef5caf2..c904817 100644
@@ -853,7 +853,7 @@ int module_finalize(const Elf_Ehdr *hdr,
 	 * ourselves */
 	for (i = 1; i < hdr->e_shnum; i++) {
 		if(sechdrs[i].sh_type = SHT_SYMTAB
-		   && (sechdrs[i].sh_type & SHF_ALLOC)) {
+		   && (sechdrs[i].sh_flags & SHF_ALLOC)) {
 			int strindex = sechdrs[i].sh_link;
 			/* FIXME: AWFUL HACK
 			 * The cast is to drop the const from
--

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

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)
#3 lore raw
Quoted 4 lines · John David Anglin

Hi Kyle,

I noticed today that this change is not in 2.6.31.1.

Dunno what happened... I must have updated patchwork and missed it in a rebase locally.