Skip to content

Instantly share code, notes, and snippets.

@pavelmash
Created March 13, 2024 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavelmash/bf4ffce0c2dc763badb3fa61650a112f to your computer and use it in GitHub Desktop.
Save pavelmash/bf4ffce0c2dc763badb3fa61650a112f to your computer and use it in GitHub Desktop.
mORMot sqlite3.o symbol replacer
#!/bin/sh
FILE=./x86_64-linux/sqlite3.o
objcopy --redefine-sym _pthread_mutex_trylock=pthread_mutex_trylock $FILE
objcopy --redefine-sym _pthread_mutex_destroy=pthread_mutex_destroy $FILE
objcopy --redefine-sym _pthread_create=pthread_create $FILE
objcopy --redefine-sym _pthread_mutexattr_init=pthread_mutexattr_init $FILE
objcopy --redefine-sym _pthread_mutexattr_settype=pthread_mutexattr_settype $FILE
objcopy --redefine-sym _pthread_mutex_init=pthread_mutex_init $FILE
objcopy --redefine-sym _pthread_mutexattr_destroy=pthread_mutexattr_destroy $FILE
objcopy --redefine-sym _pthread_join=pthread_join $FILE
objcopy --redefine-sym _dlerror=dlerror $FILE
objcopy --redefine-sym _dlclose=dlclose $FILE
objcopy --redefine-sym _dlsym=dlsym $FILE
objcopy --redefine-sym _dlopen=dlopen $FILE
objcopy --redefine-sym _pthread_mutex_unlock=pthread_mutex_unlock $FILE
objcopy --redefine-sym _pthread_mutex_lock=pthread_mutex_lock $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment