How to identify code memory model through which an object file is generated?

98 Views Asked by At

I have a relocatable object file. I want to verify whether it was build with medium/large/small memory code model (-mcmodel g++ option.). Is there a way to get that information through objdump/readelf or any other GNU toolchain utility?

Also, I have an encrypted binary file which is being compiled as -

ld  -r -b binary -o <relocatable_object_file> <encrypted_binary_file>

How can I compile this file with medium code memory model (since it is a gcc option and not ld)?

0

There are 0 best solutions below