IDA disassembled an x86-64 instruction as below:

0000000000000761                 lea     rdx, ds:0[rax*4]

What I know is, segment registers are only relevant in in segmented memory model, while in case of paging they hold an index in GDT/LDT. Why is the above instruction, out of nowhere, referring to the ds segment register?

  • Ubuntu 18.04, 64 bit – Holmes.Sherlock Dec 15 '18 at 15:25
  • The fact that you are not using a segmented memory model doesn’t mean the instruction encoding doesn’t allow you to specify the segment :) Basically on x86_64 the only relevant segment is gs, but a disassembler might still show other segment registers (implicitly) encoded in instructions... – mrexodia Dec 18 '18 at 20:34

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.