In article , Drazen Kacar writes: |> |> However, I'm confused with the mention of "reverse engineering" in the |> above paragraph. For Solaris, at least, things one needs to do are fairly |> well documented[1]. It's also possible to automate the process, so one |> doesn't have to do it again and again by hand. |> |> Could you give me an example of something that required reverse |> engineering?
One simple example is including two files that logically look like the following:
extern int a = 1; extern int b = 1;
and:
extern int a = 1; extern int c = 1;
In the context of external references to a, b and c, which will you get (a) searched for and (b) overridden?
There are a zillion other examples, and I have seen at least a couple of dozen such issues arise in real programs.
The point is that Solaris, like all or almost all modern systems, does not publish a specification of its linker and loader. It provides a guide on how to use it, which is not the same thing at all. Solaris 2.6 and before had some SERIOUS bugs in this area, but it was very hard to get them reported because there wasn't any document to say what should happen!
Regards, Nick Maclaren.