@@ -492,7 +492,9 @@ The following arguments are supported:
492492<tr ><td ><i >Integer</i ></td ><td ><tt >intptr_t</tt ></td >
493493 <td>An integer constant</td></tr>
494494<tr ><td ><tt >& ; </tt ><i >Name</i ></td ><td ><tt >const void * ; </tt ></td >
495- <td>A section/symbol/PLT/GOT name from the input ELF binary (passed-by-pointer)</td></tr>
495+ <td>The runtime address of the named section/symbol/PLT/GOT entry</td></tr>
496+ <tr ><td ><tt >static & ; </tt ><i >Name</i ></td ><td ><tt >const void * ; </tt ></td >
497+ <td>The ELF address of the named section/symbol/PLT/GOT entry</td></tr>
496498<tr ><td ><b ><tt >asm</tt ></b ></td ><td ><tt >const char * ; </tt ></td >
497499 <td>Assembly representation of the matching instruction</td></tr>
498500<tr ><td ><b ><tt >asm.size</tt ></b ></td ><td ><tt >size_t</tt ></td >
@@ -503,16 +505,22 @@ The following arguments are supported:
503505 <td>The runtime base address of the binary</td></tr>
504506<tr ><td ><b ><tt >addr</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
505507 <td>The runtime address of the matching instruction</td></tr>
508+ <tr ><td ><b ><tt >static addr</tt ></b ></td ><td ><tt >size_t</tt ></td >
509+ <td>The ELF address of the matching instruction</td></tr>
506510<tr ><td ><b ><tt >id</tt ></b ></td ><td ><tt >intptr_t</tt ></td >
507511 <td>A unique identifier (one per patch)</td></tr>
508512<tr ><td ><b ><tt >instr</tt ></b ></td ><td ><tt >const uint8_t * ; </tt ></td >
509513 <td>The machine-code bytes of the matching instruction</td></tr>
510514<tr ><td ><b ><tt >next</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
511515 <td>The runtime address of the next executed instruction</td></tr>
516+ <tr ><td ><b ><tt >static next</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
517+ <td>The ELF address of the next executed instruction</td></tr>
512518<tr ><td ><b ><tt >offset</tt ></b ></td ><td ><tt >off_t</tt ></td >
513519 <td>The ELF file offset of the matching instruction</td></tr>
514520<tr ><td ><b ><tt >target</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
515521 <td>The runtime address of the jump/call/return target, else <tt>NULL</tt></td></tr>
522+ <tr ><td ><b ><tt >static target</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
523+ <td>The ELF address of the jump/call/return target, else <tt>NULL</tt></td></tr>
516524<tr ><td ><b ><tt >trampoline</tt ></b ></td ><td ><tt >const void * ; </tt ></td >
517525 <td>The runtime address of the trampoline</td></tr>
518526<tr ><td ><b ><tt >random</tt ></b ></td ><td ><tt >intptr_t</tt ></td >
@@ -521,8 +529,6 @@ The following arguments are supported:
521529 <td>The size of <tt>instr</tt> in bytes</td></tr>
522530<tr ><td ><b ><tt >state</tt ></b ></td ><td ><tt >void * ; </tt ></td >
523531 <td>A pointer to a structure containing all general purpose registers</td></tr>
524- <tr ><td ><b ><tt >staticAddr</tt ></b ></td ><td ><tt >size_t</tt ></td >
525- <td>The ELF virtual address of the matching instruction</td></tr>
526532<tr ><td ><b ><tt >ah</tt ></b >,...,<b ><tt >dh</tt ></b >, <b ><tt >al</tt ></b >,...,<b ><tt >r15b</tt ></b ></td ><td ><tt >int8_t</tt ></td >
527533 <td>The corresponding 8bit register</td></tr>
528534<tr ><td ><b ><tt >ax</tt ></b >,...,<b ><tt >r15w</tt ></b ></td ><td ><tt >int16_t</tt ></td >
@@ -728,6 +734,9 @@ Notes:
728734 register will be updated accordingly.
729735 The structure does not include the stack register (` %rsp ` ) which must be
730736 passed separately.
737+ * The ` static ` version of some arguments gives the address relative to the ELF
738+ base, given by the formula: * runtime address = ELF address + ELF base* .
739+ This corresponds to the value used by the matching.
731740
732741---
733742##### <a id =" s2211 " >2.2.1.1 Pass-by-pointer</a >
0 commit comments