What did i do? I ran qemu-x86_64 -singlestep -d nochain,cpu ./dummy to dump all the registers of a dummy program after each instruction and used grep to save all the RIP values into a text file (qemu_rip_dump.txt). I then singlestepped the dummy program with ptrace and dumped the RIP values after each instruction into another textfile (ptrace_rip_dump.txt). I then compared
Tag: dynamic
How to access specific path in linux using shellscript
Let us consider an example, scriptPath=/home/sharath/Downloads/Atollic_TrueSTUDIO_for_STM32_9.2.0_installer In the above line of code, If user is “sharath” then he can access a file/folder same way if the user is different how can access that folder/file dynamically. below is my shellscript(.sh file): In last line of the script, ${scriptPath} is diffrent for diffrent user, how can handle in shell script. Update 1:
Linux shell temporary DNS
In a linux shell script, I want to change the dns address temporarily. To do this, I can insert temprary dns address into resolv.conf right after the shell run and remove it before the script ends. That’s it. But the problem is, all every other scripts also hit the address while the script is running. This is not what I
How does dynamic linker changes text segment of process?
If i understand correctly when user tries to execute dynamically linked executable (with execve(“foo”, “”, “”)) instead of loading text segment of “foo” dynamic linker is loaded (ld-linux.so.2) and executed. It have to load libraries required for program (“foo”) to run and change some addresses in “foo” and pass control to foo, but how is this acomplished? How (what system
Why are the values in my dynamic 2D char array being overwritten?
I’m trying to build a process logger in C on Linux, but having trouble getting it right. I’d like it to have 3 colums: USER, PID, COMMAND. I’m using the output of ps aux and trying to dynamically append it to an array. That is, for every line ps aux outputs, I want to add a row to my array.
Dynamic library timing and CPU load analysis in linux
I am writing code with one dynamic library. When I used dlopen/dlsym calls to access library functions, cpu load and execution is more as compared to linking library dynamically using -l and accessing function directly. Can anyone help to understand why this is happening? Answer Static linking requires more time and i/o at link time because all the binding occurs
Linux C++ Dynamic Libs and static initialization order
Forgive me on the long post. Its a complicate problem I wanted a complete description. On Linux Fedora 21 (g++ 4.9.2) and like. I’m working on a C++ database wrapper library using a base class of “database” and inherited classes of Oracle and Sybase. Beyond that, I wanted some of the programs to be able to dynamically load the libraries