开发者

Compile using gcc without plain text constants in ELF image

开发者 https://www.devze.com 2023-02-15 04:37 出处:网络
I have some string constants in a C code. when i compile it using gcc, the strings are stored in a.out in plain text. These can 开发者_运维知识库be hand-edited in a.out. I wan\'t them to be encoded in

I have some string constants in a C code. when i compile it using gcc, the strings are stored in a.out in plain text. These can 开发者_运维知识库be hand-edited in a.out. I wan't them to be encoded in some format so that no one can change the strings by editing a.out. Are there any objcopy or gcc options to avoid this?


is it then atleast possible to compile the code so that the elf executes only after an integrity self-check & terminate with an error if it fails...

that is it can store some kind of md5sum in the end, and check it at each execution..

i believe win32 apps have this, & hand-editing a windows exe , makes it an invalid win32 app, because the checksum fails..

is this possible in GCC/Linux ?

0

精彩评论

暂无评论...
验证码 换一张
取 消