Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310628
b: refs/heads/master
c: 3c75296
h: refs/heads/master
v: v3
  • Loading branch information
Steffen Rumler authored and Paul Mackerras committed Jun 8, 2012
1 parent 7272c67 commit 038cc54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 860aed25a1f0936d4852ab936252b47cd1e630f1
refs/heads/master: 3c75296562f43e6fbc6cddd3de948a7b3e4e9bcf
11 changes: 5 additions & 6 deletions trunk/arch/powerpc/kernel/module_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ int module_frob_arch_sections(Elf32_Ehdr *hdr,

static inline int entry_matches(struct ppc_plt_entry *entry, Elf32_Addr val)
{
if (entry->jump[0] == 0x3d600000 + ((val + 0x8000) >> 16)
&& entry->jump[1] == 0x396b0000 + (val & 0xffff))
if (entry->jump[0] == 0x3d800000 + ((val + 0x8000) >> 16)
&& entry->jump[1] == 0x398c0000 + (val & 0xffff))
return 1;
return 0;
}
Expand All @@ -204,10 +204,9 @@ static uint32_t do_plt_call(void *location,
entry++;
}

/* Stolen from Paul Mackerras as well... */
entry->jump[0] = 0x3d600000+((val+0x8000)>>16); /* lis r11,sym@ha */
entry->jump[1] = 0x396b0000 + (val&0xffff); /* addi r11,r11,sym@l*/
entry->jump[2] = 0x7d6903a6; /* mtctr r11 */
entry->jump[0] = 0x3d800000+((val+0x8000)>>16); /* lis r12,sym@ha */
entry->jump[1] = 0x398c0000 + (val&0xffff); /* addi r12,r12,sym@l*/
entry->jump[2] = 0x7d8903a6; /* mtctr r12 */
entry->jump[3] = 0x4e800420; /* bctr */

DEBUGP("Initialized plt for 0x%x at %p\n", val, entry);
Expand Down

0 comments on commit 038cc54

Please sign in to comment.