diff options
author | H. Peter Anvin <hpa@zytor.com> | 2013-11-26 20:19:53 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2013-11-26 20:19:53 -0800 |
commit | 72bf3fe98c8cc6f0ebcc9329b28fe02d9ddeef57 (patch) | |
tree | 05ea680608b652c53a1c21875ca77689ef78b6b3 /test/relocs.asm | |
parent | 186b533425405ac4e1172c7f0e6751848f04aabd (diff) | |
download | nasm-72bf3fe98c8cc6f0ebcc9329b28fe02d9ddeef57.tar.gz |
assemble: Only treat a displacement as signed if it is < asizesignrel
Only generate a signed relocation if the displacement size is less
than the address size. This matters when involving address size
overrides.
It is technically impossible to do this one perfectly, because it is
never really knowable if the displacement offset is used as a base or
an index.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'test/relocs.asm')
-rw-r--r-- | test/relocs.asm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/relocs.asm b/test/relocs.asm index a293f50f..cc560f28 100644 --- a/test/relocs.asm +++ b/test/relocs.asm @@ -5,6 +5,13 @@ mov rax,[foo] mov rax,[qword foo] + mov eax,[a32 foo] + mov rax,[a32 foo] + mov rax,[a32 qword foo] + + mov eax,foo + mov rax,dword foo + mov rax,qword foo mov eax,foo mov rax,dword foo mov rax,qword foo |