Discussion:
crunchgen and c++
Frank Zerangue
2014-07-14 16:54:35 UTC
Permalink
Is crunchgen compatible with c++ executables?

I was able to build the c++ tool into a crunched binary but get an illegal instruction trap when trying to execute the tool. And static variables in the c++ tool are initialized when any of the binaries crunched are executed.

Thanks for any ideas on this matter.

--
Frank Zerangue
***@gmail.com
David Laight
2014-08-21 07:19:46 UTC
Permalink
Post by Frank Zerangue
Is crunchgen compatible with c++ executables?
I thik you answer yourself...
Post by Frank Zerangue
I was able to build the c++ tool into a crunched binary but get an
illegal instruction trap when trying to execute the tool.
Clearly not :-)
Post by Frank Zerangue
And static variables in the c++ tool are initialized when any
of the binaries crunched are executed.
To stop that happening the linker section names for the initialiers
(and destructors) in each tool would need renaming, and then the
constructors run (in the correct order) before calling the tool's main().
(and even that might not work).
Post by Frank Zerangue
Thanks for any ideas on this matter.
I'd try a minimal crunched binary and see why it fails.
All crunchgen really does is rename the program's symbols so that
the ones from each 'tool' are separate.

David
--
David Laight: ***@l8s.co.uk
Loading...