This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

INIT.A51 as last file in project does not work

I am using multiple user libraries which are linked in the application project. The linker needs to be supplied with the libraries in the order of dependency. If any symbol reference in the successive libraries need resolution that was present in the previous supplied library, then (I assume) the linker resolves it at the end (after all libraries are scanned)

The problem is C_INITSEG values are populated in the order of inclusion in the project and symbol/object file that is linked as a process of reverse resolution adds its initialisation data after the C_INITSEG is terminated with null (INIT.A51 got scanned before reverse resolution?).

Currently, to resolve this, I have to ensure the order of libraries linked based on call tree and dependency.

It is a normal behavior of the linker? am I doing something wrong?