Skip to content

Commit

Permalink
psyq-obj-parser: fix HI16 relocations with large addends
Browse files Browse the repository at this point in the history
  • Loading branch information
boricj committed May 13, 2024
1 parent 357c8dc commit 6f33a7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/psyq-obj-parser/psyq-obj-parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1214,8 +1214,8 @@ bool PsyqLnkFile::Relocation::generateElf(ElfRelocationPass pass, const std::str
if (symbolOffset & 0x8000) {
hi += 1;
}
sectionData[offset + 0] = (uint8_t)(hi >> 8);
sectionData[offset + 1] = (uint8_t)(hi >> 0);
sectionData[offset + 0] = (uint8_t)(hi >> 0);
sectionData[offset + 1] = (uint8_t)(hi >> 8);
break;
}
case PsyqRelocType::LO16: {
Expand Down

0 comments on commit 6f33a7c

Please sign in to comment.