This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# quick and dirty bash script to extract .gnu_debugdata section | |
# from ELF binaries to generate an IDC script that adds these | |
# names as symbols | |
# --rpw, 2020-06-21 | |
SYMBOLFILE=debugdata_symbols.elf | |
if [ $# -lt 1 ]; then | |
echo "you need to supply a path to a binary" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <elf.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
// killgdb.c - prevent an elf from being loaded by gdb. | |
// Jeffrey Crowell <crowell [at] bu [dot] edu> | |
// | |
// $ objcopy --only-keep-debug program program.debug |