about summary refs log tree commit diff stats
path: root/apps/survey_elf.subx
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-28 20:01:47 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-28 20:01:47 -0800
commit83bec4a59eec5a704aab037ca0d2fd6ebcd0dbc0 (patch)
treeeab790ca2dc543b21eab553175a1a16bdc6279c1 /apps/survey_elf.subx
parent6e79e84a72fac33a4f83e3dbd595888d10c22c54 (diff)
downloadmu-83bec4a59eec5a704aab037ca0d2fd6ebcd0dbc0.tar.gz
7449
There's an ambiguity in how x86 interprets disp32 fields:

- For jumps and calls they're displacements from the starting address of
  the next instruction. So far so good.

- However, when the ModR/M requires them they can also be absolute addresses.

Ideally I'd take the presence of the ModR/M byte into account in interpreting
them.

However, it's easier to assume relative addressing only for labels in the
code segment.

This commit raises an error if we ever refer to labels in the code segment
in instructions with a ModR/M byte. (I'm assuming that no instruction with
a ModR/M byte will ever use a displacement without the ModR/M byte requiring
it.)
Diffstat (limited to 'apps/survey_elf.subx')
0 files changed, 0 insertions, 0 deletions