system calls - sys_call_table in linux kernel 2.6.18 -


I try to set the sys exit call from a variable

  in extern zero I am * sys_call_table []; However, when I try to create, the console returns me an error  
  Error: '__nr_ext' is undeclared (first use). Any suggestion would be appreciated :) Thanks   

Since you are in kernel 2.6.x, sys_call_table does not export any more. If you try to avoid compilation error then include

  # include & lt; Linux / unistd.h & gt; However, this will not work, so the work around "play" with sys_call_table is to find the address of sys_call_table in this command from the system XXXX.map (located at / boot):  
  grep sys_call System.map-2.6. X-I  

will enter this address, then this code will allow you to modify the table:

  unsigned long * sys_call_table; Sys_call_table = (unsigned long *) simple_strtoul ("0xc0318500", tap, 16); Original_mkdir = sys_call_table [__nr_mkdir]; Sys_call_table [__nr_mkrd] = mkdir_modifference;  

Hope this works for you, I have tested it under the 2.6.24 kernel so it should work for 2.6.18

Check here too, it's great


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -