Commit 010abedb authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Richard Henderson

[PATCH] alpha: handle unaligned REFQUADs produced by BUG() macro

parent 95a41bc4
......@@ -199,7 +199,9 @@ apply_relocate_add(Elf64_Shdr *sechdrs, const char *strtab,
case R_ALPHA_NONE:
break;
case R_ALPHA_REFQUAD:
*(u64 *)location = value;
/* BUG() can produce misaligned relocations. */
((u32 *)location)[0] = value;
((u32 *)location)[1] = value >> 32;
break;
case R_ALPHA_GPREL32:
value -= gp;
......
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