- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My other understanding is that the reverse is generally OK with caveats ... -mcmodel=small code can be linked against a medium library assuming the library is fairly lean on static memory. Plus it works on shared libraries ... Does this mean that a message I just read in a makefile configuration that mcmodel=medium is there for linking cannot be right?
All of this leads me to wonder if there are OS or intel utilities out there to determine the memory model of a dependent library. I can tell that an ad hoc test would be to compile my code with -mcmodel=medium and small see if it breaks only in the former case. This has the appeal that it will catch every static library I forget. However an explicit test would be wonderful. Thanks.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding is that -mcmodel changes how the compiler's code generator generates address references to code and/or data in that different instruction variants are used. I'm not aware that there's any sort of property of the object module that can be queried, especially when in a library. http://stackoverflow.com/questions/12916176/gfortran-for-dummies-what-does-mcmodel-medium-do-exactly has some useful elaboration.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page