Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc updates from David Miller:

1) Debugging builds on 32-bit sparc need to handle the R_SPARC_DISP32
relocation, not just 64-bit sparc. From Andreas Larsson.

2) Wei Yongjun noticed that module_alloc() on sparc can return an
error pointer, but that's not allowed. module_alloc() should
return only a valid pointer, or NULL.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc: fix the return value of module_alloc()
sparc32: Enable the relocation target R_SPARC_DISP32 for sparc32

+5 -8
+5 -8
arch/sparc/kernel/module.c
··· 48 48 return NULL; 49 49 50 50 ret = module_map(size); 51 - if (!ret) 52 - ret = ERR_PTR(-ENOMEM); 53 - else 51 + if (ret) 54 52 memset(ret, 0, size); 55 53 56 54 return ret; ··· 114 116 v = sym->st_value + rel[i].r_addend; 115 117 116 118 switch (ELF_R_TYPE(rel[i].r_info) & 0xff) { 119 + case R_SPARC_DISP32: 120 + v -= (Elf_Addr) location; 121 + *loc32 = v; 122 + break; 117 123 #ifdef CONFIG_SPARC64 118 124 case R_SPARC_64: 119 125 location[0] = v >> 56; ··· 128 126 location[5] = v >> 16; 129 127 location[6] = v >> 8; 130 128 location[7] = v >> 0; 131 - break; 132 - 133 - case R_SPARC_DISP32: 134 - v -= (Elf_Addr) location; 135 - *loc32 = v; 136 129 break; 137 130 138 131 case R_SPARC_WDISP19: