fixup_handler="__dl_fixup_wrapper"
reloc_handler="__dl_reloc_wrapper"
linker_info_header="/usr/local/include/linker_info.h"
+libpthread_pkg_name="glibc"
+libpthread_init_func="__pthread_initialize_minimal"
output=$1
echo -e "/bin/echo \"$addr\" > /sys/kernel/debug/swap/got_patcher/handler/reloc_handler_off" >> $filename
}
+function print_libpthread()
+{
+ filename=$1
+
+ libpthread_path=$(rpm -ql $libpthread_pkg_name | grep "/lib/libpthread" | head -1)
+ addr=$(readelf -sW $libpthread_path | grep $libpthread_init_func | awk '{print "0x" $2}')
+
+ echo -e "/bin/echo \"$libpthread_path\" > /sys/kernel/debug/swap/got_patcher/pthread/path" >> $filename
+ echo -e "/bin/echo \"$addr\" > /sys/kernel/debug/swap/got_patcher/pthread/minimal_init_off" >> $filename
+}
+
function print_enable()
{
filename=$1
print_probe_lib $output
print_dl_fixup_handler_off $output
print_dl_reloc_handler_off $output
+print_libpthread $output
print_enable $output