j-h-k / Mod-ELF-Symbol

replace or modify symbol names in elf object files (relocatable and executable)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mod-ELF-Symbol

replace or modify symbol names in elf object files (relocatable and executable)

SETUP

In your Terminal:

$> git clone https://github.com/j-h-k/Mod-ELF-Symbol.git
$> make

USAGE/HOW TO

#f03c15 Append to symbol foo

foo --> foobar

$> ./mod-elf-symbol -o main.o -s foo --singlestr=bar > /dev/zero

image of HOWTOAPPEND

#c5f015 Replace symbol foo

foo --> bar

$> ./mod-elf-symbol -o main.o -c foo --completestr=bar > /dev/zero

image of HOWTOREPLACE

#1589F0 Number symbol foo

foo --> foo__1

$> ./mod-elf-symbol -o main.o -k foo --keepnumstr=__ > /dev/zero 

Examples with Makefile

$> make <run_append | run_replace | run_number>  

TEMPLATES TO USE

#f03c15 Append to symbol(s):
foo --> foo<string_to_append>

$> ./mod-elf-symbol -o file1.o [more files.o ...] \
-s symbol1 symbol2 symbol3 [more symbols ...] \
--singlestr=<string_to_append>

#c5f015 Replace symbol(s):
foo --> <new_symbol>

$> ./mod-elf-symbol -o file1.o [more files.o ...] \
-c symbol1 [more symbols ...] \
--completestr=<new_symbol>

#1589F0 Number symbols(s):
foo --> foo<string_inbetween><number>

$> ./mod-elf-symbol -o file1.o [more files.o ...] \
-k symbol1 symbol2 symbol3 [more symbols ...] \
--keepnumstr=<string_inbetween>

SPECIAL FLAGS

IMPORTANT RULES

'--singlestr and --keepnumstr and --compeltestr can only be used once per program execution.'

About

replace or modify symbol names in elf object files (relocatable and executable)


Languages

Language:C 97.4%Language:Makefile 2.6%