Information stored in the .mod files

Information stored in the .mod files

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

publicaciones de 4 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen 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

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

Imagen 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

Inicie sesión para dejar un comentario.