Commit 4f61e078 authored by Michael Cree's avatar Michael Cree Committed by Matt Turner

alpha: support R_ALPHA_REFLONG relocations for module loading

Since commit 71810db2 (modversions: treat symbol CRCs
as 32 bit quantities) R_ALPHA_REFLONG relocations can be required
to load modules. This implements it.
Tested-by: default avatarBob Tracy <rct@gherkin.frus.com>
Reviewed-by: default avatarRichard Henderson <rth@twiddle.net>
Signed-off-by: default avatarMichael Cree <mcree@orcon.net.nz>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
parent 4606f68f
...@@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab, ...@@ -181,6 +181,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
switch (r_type) { switch (r_type) {
case R_ALPHA_NONE: case R_ALPHA_NONE:
break; break;
case R_ALPHA_REFLONG:
*(u32 *)location = value;
break;
case R_ALPHA_REFQUAD: case R_ALPHA_REFQUAD:
/* BUG() can produce misaligned relocations. */ /* BUG() can produce misaligned relocations. */
((u32 *)location)[0] = value; ((u32 *)location)[0] = value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment