This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; nasm syntax | |
BITS 64 | |
; patch start at 0x486ff5 (call getpid in atiddxCheckXserverVersion) | |
%define patch_start (0x486ff5) | |
%define patch_end (0x4871ff) | |
%define patch_size (patch_end-patch_start) | |
%define dlopen_plt_offset (0x463470-patch_start) | |
%define dlsym_plt_offset (0x47aa50-patch_start) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
LOAD_EXTENSION_OFF=$(printf "%d" 0x`objdump -d $1 | grep -m1 '<LoadExtension@plt>:' | cut -d' ' -f1`) | |
LOAD_EXTENSION_LIST_OFF=$(printf "%d" 0x`objdump -d $1 | grep -m1 '<LoadExtensionList@plt>:' | cut -d' ' -f1`) | |
DIFF=$((LOAD_EXTENSION_LIST_OFF - LOAD_EXTENSION_OFF)) | |
cat << EOF > patch$$.asm | |
BITS 64 |