Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155838
b: refs/heads/master
c: fadf2e6
h: refs/heads/master
v: v3
  • Loading branch information
John Williams authored and Michal Simek committed Jul 27, 2009
1 parent ff18510 commit 1035a85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 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: bfc0ca0d33e24fca5b89acb378a8a9712ffe22b6
refs/heads/master: fadf2e60a6dc7267658fa0c9e3bef13c699c7e1f
15 changes: 10 additions & 5 deletions trunk/arch/microblaze/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
Elf32_Rela *rela = (void *)sechdrs[relsec].sh_addr;
Elf32_Sym *sym;
unsigned long int *location;
unsigned long int locoffs;
unsigned long int value;
#if __GNUC__ < 4
unsigned long int old_value;
Expand Down Expand Up @@ -113,10 +112,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
break;

case R_MICROBLAZE_64_PCREL:
locoffs = (location[0] & 0xFFFF) << 16 |
#if __GNUC__ < 4
old_value = (location[0] & 0xFFFF) << 16 |
(location[1] & 0xFFFF);
value -= (unsigned long int)(location) + 4 +
locoffs;
value -= old_value;
#endif
value -= (unsigned long int)(location) + 4;
location[0] = (location[0] & 0xFFFF0000) |
(value >> 16);
location[1] = (location[1] & 0xFFFF0000) |
Expand All @@ -125,6 +126,10 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
value);
break;

case R_MICROBLAZE_32_PCREL_LO:
pr_debug("R_MICROBLAZE_32_PCREL_LO\n");
break;

case R_MICROBLAZE_NONE:
pr_debug("R_MICROBLAZE_NONE\n");
break;
Expand All @@ -133,7 +138,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
printk(KERN_ERR "module %s: "
"Unknown relocation: %u\n",
module->name,
ELF32_R_TYPE(rela->r_info));
ELF32_R_TYPE(rela[i].r_info));
return -ENOEXEC;
}
}
Expand Down

0 comments on commit 1035a85

Please sign in to comment.