Download the Pin framework for Linux from the official Intel Pin website:
Once the download is complete:
- Extract the tar file:
tar -xvf pin-*.tar.gz - Move the extracted folder to your home directory for convenience:
Replace
mv pin-<version> ~/pinkit
<version>with the actual version of Pin you downloaded.
Change directory to the location of the CSE-509-pintools repository:
cd /path/to/CSE-509-pintoolsReplace /path/to with the actual path to the project directory.
Set the PIN_ROOT environment variable to the path of your Pin kit and build the tool:
PIN_ROOT=~/pinkit makeThis will compile the BackwardEdgeCFI tool and create a shared object file (BackwardEdgeCFI.so) in the obj-intel64 directory.
To use the BackwardEdgeCFI tool on an application, run the following command:
~/pinkit/pin -t obj-intel64/BackwardEdgeCFI.so -- <application_name>- Replace
<application_name>with the executable you want to analyze. - Ensure the application is accessible from the current directory or provide the full path.
For example, to instrument the ls command:
~/pinkit/pin -t obj-intel64/BackwardEdgeCFI.so -- /bin/ls- Ensure you have
makeandg++installed on your system. - If you encounter issues during compilation or runtime, verify that the Pin kit is compatible with your system architecture (e.g., x86-64).
For further assistance, refer to the Pin documentation or contact your course instructor.