2012-05-29 15:52:43 +00:00
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-21 11:12:37 +00:00
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2011-06-27 19:44:51 +00:00
|
|
|
|
|
|
|
|
|
from __future__ import with_statement
|
|
|
|
|
|
|
|
|
|
with open('crtdll.obj', 'rb') as infile:
|
|
|
|
|
data = infile.read()
|
|
|
|
|
with open('crtdll_fixed.obj', 'wb') as outfile:
|
2011-07-01 01:40:30 +00:00
|
|
|
|
# for Win32
|
2011-06-27 19:44:51 +00:00
|
|
|
|
data = data.replace('__imp__free', '__imp__frex')
|
2011-07-01 01:40:30 +00:00
|
|
|
|
# for Win64
|
|
|
|
|
data = data.replace('__imp_free', '__imp_frex')
|
2011-06-27 19:44:51 +00:00
|
|
|
|
outfile.write(data)
|