Add process_features() addr passing to kernel 19/151719/3
authorAlexander Aksenov <a.aksenov@samsung.com>
Tue, 19 Sep 2017 15:57:28 +0000 (18:57 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Tue, 26 Sep 2017 14:09:35 +0000 (17:09 +0300)
Change-Id: Ic57d7662b04dbcd132bc0769aefcb593fbc8b0ca
Signed-off-by: Alexander Aksenov <a.aksenov@samsung.com>
scripts/gen_gtp_data.sh

index 9cf1265..37f24e8 100755 (executable)
@@ -3,6 +3,7 @@
 handlers_lib="$LIBDIR/da_probe_tizen.so"
 fixup_handler="__dl_fixup_wrapper"
 reloc_handler="__dl_reloc_wrapper"
+proc_features="process_features"
 linker_info_header="$INCLUDEDIR/linker_info.h"
 libpthread_pkg_name="glibc"
 libpthread_init_func="__pthread_initialize_minimal"
@@ -80,6 +81,14 @@ function print_dl_reloc_handler_off()
     echo -e "/bin/echo \"$addr\" > /sys/kernel/debug/swap/got_patcher/handler/reloc_handler_off" >> $filename
 }
 
+function print_proc_features_off()
+{
+    filename=$1
+
+    addr=$(parse_elf -f $handlers_lib --addr_format=swap --syms | grep $proc_features | awk '{print "0x" $1}')
+    echo -e "/bin/echo \"$addr\" > /sys/kernel/debug/swap/got_patcher/handler/proc_features_off" >> $filename
+}
+
 function print_libpthread()
 {
     filename=$1
@@ -105,5 +114,6 @@ print_dl_reloc_off $output
 print_probe_lib $output
 print_dl_fixup_handler_off $output
 print_dl_reloc_handler_off $output
+print_proc_features_off $output
 print_libpthread $output
 print_enable $output