Remove wrong alignment check on relocations. Add a comment.

This commit is contained in:
Henrik Rydgard committed 2013-11-15 18:47:27 +01:00
1 parent 20e1bdceeb
commit 77ef79892e
1 file changed
+5 -1
+5 -1
View File
@@ -78,7 +78,11 @@ bool ElfReader::LoadRelocations(Elf32_Rel *rels, int numRelocs)
}
addr += segmentVAddr[readwrite];
if ((addr & 3) || !Memory::IsValidAddress(addr)) {
// It appears that misaligned relocations are allowed.
// Will they work correctly on big-endian?
if (!Memory::IsValidAddress(addr)) {
if (numErrors < 10) {
WARN_LOG(LOADER, "Suspicious address %08x, skipping reloc", addr);
} else if (numErrors == 10) {