Author Topic: Call abs_addr-$  (Read 2335 times)

Offline suncowiam

  • Jr. Member
  • *
  • Posts: 4
Call abs_addr-$
« on: July 20, 2024, 12:22:24 AM »
Is there an argument to calculate the target address - next inst to help calculate relative addresses?

I need to compile a specific relative address in a call or jmp instruction.

Offline suncowiam

  • Jr. Member
  • *
  • Posts: 4
Re: Call abs_addr-$
« Reply #1 on: July 20, 2024, 04:45:03 AM »
I found a possible solution:

SECTION .text
  call 60000h-next_addr-$$
next_addr:
  mov rax, 1

When compiled, the relative offset will equate to 60000h.  Does anyone else have any better solutions?

Thanks