tags:

views:

35

answers:

1

Currently, when I create a shared library, functions from within the same object files like to lie together. Is there a good solution (that does not involve splitting up source files) to try and spread function locations apart? We are currently using a cross-compiled, 4.2.1 version of gcc and the gnu tools.

A: 

While you can do what you want using GNU-ld linker script (if you are on platform for which GNU ld works), you can't do it portably.

In addition, it's a totally wasted effort: any hacker worth their salt will not care about moving functions around. If you really want to make it hard*er* to reverse engineer your code (or just bypass your license scheme), you should use much stronger techniques, described e.g. here.

Arguably, that's still totally wasted effort.

Employed Russian
Thanks. I understand the arguments that fighting crackers is a losing battle. That said, some of the push for this is management driven, not developer driven.
anonymouse