Windows tools produce different binary files

Chris Johns chrisj at rtems.org
Wed Sep 13 07:08:57 UTC 2006


Ian Caddy wrote:
> 
> It has turned out to be a register optimisation problem.  For some 
> reason on the Windows 2000 machines, the location of local variables on 
> the stack is placed in a different position to the XP built application.
> 
> We have narrowed it down to the way qsort functions between the 2 
> different OSes.
> 

I am not sure any problems exists which would attract any attention with 
the MinGW or GCC maintainers. Yes you may be getting different results 
based on qsort doing different things but qsort does not seem broken on 
either platform. Looking at the SUS:

http://www.opengroup.org/onlinepubs/000095399/functions/qsort.html

it states "If two members compare as equal, their order in the sorted 
array is unspecified." so they might change or they may not. GCC is 
generating different code on different platforms as a result but it is 
not generating broken code.

> Since our user base uses both Windows XP and Windows 2000, we need to 
> support both platforms with identical output results.  We are currently 
> trying to put our own version of qsort into gcc, to see if this fixes 
> the problem.

I can understand your requirement to have the same binary output on all 
development platforms how-ever I think you may have to manage this one 
locally.

Regards
Chris



More information about the users mailing list