Thursday, 15 July 2010

Does c++ linker throw away what is not needed or adds only what is needed? -


If a linker begins to satisfy the missing symbols, until it does so until all the necessary The symbols are not satisfied, we are "only needed". On the other hand there is a complete collection of symbols and then based on some algorithm, it is not necessary to remove symbols from scanning, we are called "throw". For me it is sensitively correct that we are only required to add this aspect of the process of adding.

I am curious that the Stakeworf community community agrees, because I believe that it gives a strong argument to rely on the facilities of such linkers.

All links work in a connector mode. Graph theory is best explained by using

By identifying one linker for one or more entry points (for an executable, for export functions for a library, for the main ) begins. These entry points should be included.

However, these export points can be included in large areas / segments (many compilers can not package different functions or data).

In addition to this, functions are called other functions, a linker may need to add those functions - and then, the limitations of the compiler can be very extra when things are too large, the dragging objects This phase is called "Resolve dependency" and is usually done recursively until any other function is missing.

Why are these sections too big? A common problem is that compiler / linker pairs can not say dependencies if the linker can not be told that depending on XY, the compiler should keep X and Y in the same segment. It rises to that point where a whole. The CPP file ends in a single section, unfortunately - and drag all those unnecessary functions, which are in their unnecessary dependencies. I have seen executable balloons up to 600 MB.


No comments:

Post a Comment