Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
liblink: fix the alignement of large code blocks
Previously, we aligned 8-byte ops to 8 bytes. This is wrong, only DWORDs need to be 8-byte alligned. 8-byte code sequences (i.e. 2 instructions) need to follow one another without padding. This code used to be misassembled like this: TEXT foo(SB),7,$-8 MOV $bar(SB), R4 MOV bar(SB), R5 RET 0x0000 c4 00 00 58 00 00 00 00 e1 00 00 58 25 00 40 f9 ...X.......X%.@. 0x0010 c0 03 5f d6 00 00 00 14 00 00 00 00 00 00 00 00 .._............. 0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ Notice the 4 zero bytes at 0x4. Now it's: 0x0000 c4 00 00 58 e1 00 00 58 25 00 40 f9 c0 03 5f d6 ...X...X%.@..._. 0x0010 00 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0x0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
- Loading branch information