Information stored in the .mod files

Information stored in the .mod files

Portrait de albert

Dear all,

I'm a bit curious which information is exactly stored in the .mod files.

I know that a.o. variables names, parameters, type definitions and function prototypes are stored in the .md file and that initializations and function bodies are stored in the .o file.

I'm wondering if the layout, e.g. the offset of variables etc. in a module are stured as well.

I tried to find a format description of the .mod file but was not successful.

Any information is helpful.

Best Regards,

Albert

4 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.
Portrait de jimdempseyatthecove

Think of a .mod file as a precompiled header.

If the source file contains just module(s) without: initialization, contains code, or tacked on procedures then compiler outputs a .mod file (or multiple mod files, one for each module).

If the source file contains with: initialization, contains code, or tacked on procedures then compiler outputs a .mod file (or multiple mod files, one for each module), plus a .obj file containing the compiled code. The .MOD files folder needs to be in the include path, the .obj file folder in the linker input path (or explicitly specified).

Jim Dempsey

www.quickthreadprogramming.com
Portrait de albert

Thanks for the answer, but to be honest most of the information was already mentioned in the original post.

Interesting is the layout of the .mod file, e.g. if the offset of variables etc. in a module are stored as well.

I tried to find a format description of the .mod file but was not successful.

Albert

Portrait de Steve Lionel (Intel)

There is no object code information in .mod files. As Jim says, it contains information on declarations used during compiling. If you have a derived type, the types and order of the components are in the .mod file, but not relative locations of module variables. Routine declarations are there but no code. The format of .mod files is not documented - it's effectively the compiler's internal symbol table.

Steve

Connectez-vous pour laisser un commentaire.