Sign in to follow this  
sto8qc

Removing _fltused from import table

Recommended Posts

Hello, My compiler (Intel C++ compiler 9.1, MSVC 6.0/2003/2005 compatible) generates object files which imports symbol `_fltused` when floating point constants/functions are used in source code. Is there any way to disable this using compiler parameters? I don't need any functionality from run-time library and therefore I don't need any stuff related to it in my object files. Thank you.

Share this post


Link to post
Share on other sites
Why is it a bad thing?

Also, if you use floating point at all in your program, there is a very good chance you do need support from the runtime because many normal floating point operations (such as float-to-int conversion) are much more complicated than simply using store-float-as-int assembly instructions due to the requirements of the C++ language specification. In MSVC 2002, at least, that operation is actually performed by a very long function that is part of the runtime library.

Share this post


Link to post
Share on other sites
Quote:
Original post by Extrarius
Why is it a bad thing?

Also, if you use floating point at all in your program, there is a very good chance you do need support from the runtime because many normal floating point operations (such as float-to-int conversion) are much more complicated than simply using store-float-as-int assembly instructions due to the requirements of the C++ language specification. In MSVC 2002, at least, that operation is actually performed by a very long function that is part of the runtime library.

I have just tried to convert floating point number to integer and linker didn't show any errors about unresolved externals. Code was not removed by optimizer - I can see it in actual assembly output (fistp FPU instruction is used) so I'm sure I can live without run-time libraries.

I think you are talking about emulating floating point functionality (long functions to convert float to integer, etc.).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this