2012-05-29 08:52:43 -07:00
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
2012-05-21 04:12:37 -07: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 12:44:51 -07: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-06-30 18:40:30 -07:00
|
|
|
|
# for Win32
|
2011-06-27 12:44:51 -07:00
|
|
|
|
data = data.replace('__imp__free', '__imp__frex')
|
2011-06-30 18:40:30 -07:00
|
|
|
|
# for Win64
|
|
|
|
|
data = data.replace('__imp_free', '__imp_frex')
|
2011-06-27 12:44:51 -07:00
|
|
|
|
outfile.write(data)
|