Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It could be done if you heavily patched everything you linked in, or developed an entirely new compiler, or both, but as-is, no.


Apart from the global initializers, everything necessary could be accomplished with a reasonable-length shell script applying "objcopy --redefine-syms" to the object files between the compilation and linking steps to add application-specific prefixes to all external symbols defined in any of the application's object files, without any changes to the source code or the compiler. I'm not saying it would be trivial, but it wouldn't require writing an entirely new compiler.

Source: I've implemented programs similar to busybox before by merging programs originally intended to be compiled separately, albeit on a smaller scale than an entire Linux distribution.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: