Author Topic: Relocation table in rdoff files  (Read 8299 times)

Robert D

  • Guest
Relocation table in rdoff files
« on: November 17, 2009, 06:51:21 AM »
I'm wanting to write a fat-free relocatable piece of code, and rdoff seems like a very good way to do that.

The assembly code I'm testing it on is:

section .text
start:
mov eax, 50
mov ebx, 30
cmp ebx, 30
je yeah
jne notyeah
yeah:
mov eax, 55
mov ebx, 33
notyeah:
mov eax, 66
mov ebx, 44

However, after compiling the above code with "nasm -f rdf test.asm" there doesn't seem to be any relocation table attached - or even a header.

Is there something I'm missing?

Thanks,
Rob.

Robert D

  • Guest
Re: Relocation table in rdoff files
« Reply #1 on: November 17, 2009, 07:19:54 AM »
Argh!! My bad. There was no relocation table because there was nothing to relocate.

JNE/JE are relative jumps, not absolute.

Rob.