Skip to content

What qualifies as a code reference versus a data reference? #2744

Answered by lwerdna
lwerdna asked this question in Analysis
Discussion options

You must be logged in to vote

In the phrases "code reference" and "data reference", the words "code" and "data" refer to the location of the reference, not the kind of reference it is. So any references residing in functions are code references, even when those references are that kind that just get the address of the referent.

First case:

Expecting only calls or branches for code references is thinking incorrectly of perhaps an "execution reference". As explained above, we have code (the instruction lea rcx, [rel __libc_csu_init] referencing (getting the address of) __libc_csu_init into rcx, so it's a code reference.

EDIT: Peter has a nice compact way of stating it:

"code references don't have the distinction of "ad…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lwerdna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant