From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10191 invoked by alias); 10 Oct 2002 23:59:07 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 10184 invoked from network); 10 Oct 2002 23:59:07 -0000 Received: from unknown (HELO smtp.superh.com) (65.219.1.204) by sources.redhat.com with SMTP; 10 Oct 2002 23:59:07 -0000 Received: from sh-us-ex01.us.w2k.superh.com (sh-us-ex01.us.superh.com [192.168.4.40]) by smtp.superh.com (Switch-2.2.0/Switch-2.2.0) with ESMTP id g9ANoRN02188; Thu, 10 Oct 2002 16:50:27 -0700 (PDT) content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----_=_NextPart_001_01C270B8.EAD78944" Subject: [Patch] sh64: Fix refcounting for SHmedia X-MimeOLE: Produced By Microsoft Exchange V6.0.5762.3 Date: Thu, 10 Oct 2002 16:59:00 -0000 Message-ID: <287E4644B5249D449C56FA5409A874AE03C7A8@sh-us-ex01.us.w2k.superh.com> X-MS-Has-Attach: yes X-MS-TNEF-Correlator: From: "Clarke, Stephen" To: Cc: X-SW-Source: 2002-10/txt/msg00223.txt.bz2 This is a multi-part message in MIME format. ------_=_NextPart_001_01C270B8.EAD78944 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-length: 602 Back in August I promised to work on the required fixes to refcounting for sh64 in the sh elf backend. I've finally got these implemented and tested them by building and using glibc (.so) on SH-5 Linux. The attached file contains the patch, it follows fairly closely what I speculatively outlined in: http://sources.redhat.com/ml/binutils/2002-07/msg00190.html This patch is for the 32-bit abi only. Steve. -- Stephen Clarke, Principal Engineer, SuperH Inc. Phone:1-408-273-3146, Fax:1-408-273-3199, mailto:Stephen.Clarke@superh.com Mail: SuperH Inc., 405 River Oaks Pkwy, San Jose, CA 95134, USA. ------_=_NextPart_001_01C270B8.EAD78944 Content-Type: text/plain; name="datalabel-got-patch.txt" Content-Transfer-Encoding: base64 Content-Description: datalabel-got-patch.txt Content-Disposition: attachment; filename="datalabel-got-patch.txt" Content-length: 23148 MjAwMi0xMC0xMCAgU3RlcGhlbiBDbGFya2UgPHN0ZXBoZW4uY2xhcmtlQHN1 cGVyaC5jb20+CgoJKiBlbGYzMi1zaC5jIChlbGZfc2hfbGlua19oYXNoX2Vu dHJ5KTogUmVwbGFjZQoJZGF0YWxhYmVsX2dvdF9vZmZzZXQgd2l0aCB1bmlv biBvZiBkYXRhbGFiZWxfZ290CglvZmZzZXQgYW5kIHJlZmNvdW50LgoJKHNo X2VsZl9saW5rX2hhc2hfbmV3ZnVuYyk6IEluaXRpYWxpemUgZGF0YWxhYmVs X2dvdC5yZWZjb3VudC4KCShhbGxvY2F0ZV9keW5yZWxvY3MpOiBEZWxldGUg dW5uZWNlc3NhcnkgY29kZSBmb3IKCVNUVF9EQVRBTEFCRUwgdHlwZS4gIENy ZWF0ZSBlbnRyeSBpbiBnb3QgZm9yCglkYXRhbGFiZWwgdmVyc2lvbiBvZiBz eW1ib2wgaWYgZGF0YWxhYmVsX2dvdC5yZWZjb3VudCA+IDAuCgkoc2hfZWxm X3JlbG9jYXRlX3NlY3Rpb24pOiBVc2UgZGF0YWxhYmVsX2dvdCB1bmlvbi4K CShzaF9lbGZfZ2Nfc3dlZXBfaG9vayk6IFB1bGwgY29tbW9uIGNvZGUgdG8g aW5pdGlhbGl6ZQoJaCBhbmQgZWggb3V0IG9mIHN3aXRjaCBzdGF0ZW1lbnQu ICBEZWNsYXJlIHNlZW5fc3R0X2RhdGFsYWJlbC4KCUluaXRpYWxpemUgaXQu ICBEZWNyZW1lbnQgZGF0YWxhYmVsX2dvdC5yZWZjb3VudCBmb3IKCWdvdCBy ZWxvY3Mgd2hlbiBzZWVuX3N0dF9kYXRhbGFiZWwgaXMgdHJ1ZS4KCURlY3Jl bWVudCBsb2NhbF9nb3RfcmVmY291bnRzIGVudHJ5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JlbF9nb3Rfb2Zmc2V0 OwogICNlbmRpZgogIAogICAgLyogVHJhY2sgZHluYW1pYyByZWxvY3MgY29w aWVkIGZvciB0aGlzIHN5bWJvbC4gICovCi0tLSAzMzgzLDMzOTMgLS0tLQog ICAgc3RydWN0IGVsZl9saW5rX2hhc2hfZW50cnkgcm9vdDsKICAKICAjaWZk ZWYgSU5DTFVERV9TSE1FRElBCiEgICB1bmlvbgohICAgewohICAgICBiZmRf c2lnbmVkX3ZtYSByZWZjb3VudDsKISAgICAgYmZkX3ZtYSBvZmZzZXQ7CiEg ICB9IGRhdGFsYWJlbF9nb3Q7CiAgI2VuZGlmCiAgCiAgICAvKiBUcmFjayBk eW5hbWljIHJlbG9jcyBjb3BpZWQgZm9yIHRoaXMgc3ltYm9sLiAgKi8KKioq KioqKioqKioqKioqIHNoX2VsZl9saW5rX2hhc2hfbmV3ZnVuYyAoZW50cnks IHRhYmxlLCAKKioqIDM0NTYsMzQ2MiAqKioqCiAgICAgICAgZWgtPmR5bl9y ZWxvY3MgPSBOVUxMOwogICAgICAgIGVoLT5nb3RwbHRfcmVmY291bnQgPSAw OwogICNpZmRlZiBJTkNMVURFX1NITUVESUEKISAgICAgICByZXQtPmRhdGFs YWJlbF9nb3Rfb2Zmc2V0ID0gKGJmZF92bWEpIC0xOwogICNlbmRpZgogICAg ICB9CiAgCi0tLSAzNDYwLDM0NjcgLS0tLQogICAgICAgIGVoLT5keW5fcmVs b2NzID0gTlVMTDsKICAgICAgICBlaC0+Z290cGx0X3JlZmNvdW50ID0gMDsK ICAjaWZkZWYgSU5DTFVERV9TSE1FRElBCiEgICAgICAgZWgtPmRhdGFsYWJl bF9nb3QucmVmY291bnQgPQohIAkoKHN0cnVjdCBlbGZfbGlua19oYXNoX2Vu dHJ5ICopIHJldCktPmdvdC5yZWZjb3VudDsKICAjZW5kaWYKICAgICAgfQog IAoqKioqKioqKioqKioqKiogYWxsb2NhdGVfZHlucmVsb2NzIChoLCBpbmYp CioqKiAzOTU0LDM5ODAgKioqKgogIAl9CiAgCiAgICAgICAgcyA9IGh0YWIt PnNnb3Q7CiAgI2lmZGVmIElOQ0xVREVfU0hNRURJQQohICAgICAgIGlmICho LT50eXBlID09IFNUVF9EQVRBTEFCRUwpCiEgCXsKISAJICBzdHJ1Y3QgZWxm X3NoX2xpbmtfaGFzaF9lbnRyeSAqaHNoOwogIAohIAkgIGggPSAoc3RydWN0 IGVsZl9saW5rX2hhc2hfZW50cnkgKikgaC0+cm9vdC51LmkubGluazsKISAJ ICBoc2ggPSAoc3RydWN0IGVsZl9zaF9saW5rX2hhc2hfZW50cnkgKiloOwoh IAkgIGhzaC0+ZGF0YWxhYmVsX2dvdF9vZmZzZXQgPSBzLT5fcmF3X3NpemU7 CiAgCX0KISAgICAgICBlbHNlCiEgCWgtPmdvdC5vZmZzZXQgPSBzLT5fcmF3 X3NpemU7CiEgI2Vsc2UKISAgICAgICBoLT5nb3Qub2Zmc2V0ID0gcy0+X3Jh d19zaXplOwohICNlbmRpZgogICAgICAgIHMtPl9yYXdfc2l6ZSArPSA0Owog ICAgICAgIGR5biA9IGh0YWItPnJvb3QuZHluYW1pY19zZWN0aW9uc19jcmVh dGVkOwogICAgICAgIGlmIChXSUxMX0NBTExfRklOSVNIX0RZTkFNSUNfU1lN Qk9MIChkeW4sIGluZm8sIGgpKQogIAlodGFiLT5zcmVsZ290LT5fcmF3X3Np emUgKz0gc2l6ZW9mIChFbGYzMl9FeHRlcm5hbF9SZWxhKTsKICAgICAgfQog ICAgZWxzZQohICAgICBoLT5nb3Qub2Zmc2V0ID0gKGJmZF92bWEpIC0xOwog IAogICAgaWYgKGVoLT5keW5fcmVsb2NzID09IE5VTEwpCiAgICAgIHJldHVy biB0cnVlOwotLS0gMzk1OSwzOTk4IC0tLS0KICAJfQogIAogICAgICAgIHMg PSBodGFiLT5zZ290OworICAgICAgIGgtPmdvdC5vZmZzZXQgPSBzLT5fcmF3 X3NpemU7CisgICAgICAgcy0+X3Jhd19zaXplICs9ID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AobG9jYWxf Z290X3JlZmNvdW50cyAhPSBOVUxMKQohIAkgIHsKISAJICAgIGlmIChsb2Nh bF9nb3RfcmVmY291bnRzW3Jfc3ltbmR4XSA+IDApCiEgCSAgICAgIGxvY2Fs X2dvdF9yZWZjb3VudHNbcl9zeW1uZHhdIC09IDE7CiEgCSAgfQohIAlicmVh azsKICAKISAgICAgICBkZWZhdWx0OgohIAlicmVhazsKISAgICAgICB9CiAg CiAgICByZXR1cm4gdHJ1ZTsKICB9Ci0tLSA1MjQyLDU0MDEgLS0tLQogIAog ICAgcmVsZW5kID0gcmVsb2NzICsgc2VjLT5yZWxvY19jb3VudDsKICAgIGZv ciAocmVsID0gcmVsb2NzOyByZWwgPCByZWxlbmQ7IHJlbCsrKQohICAgICB7 CiEgI2lmZGVmIElOQ0xVREVfU0hNRURJQQohICAgICAgIGludCBzZWVuX3N0 dF9kYXRhbGFiZWwgPSAwOwogICNlbmRpZgogIAohICAgICAgIHJfc3ltbmR4 ID0gRUxGMzJfUl9TWU0gKHJlbC0+cl9pbmZvKTsKISAgICAgICBpZiAocl9z eW1uZHggPCBzeW10YWJfaGRyLT5zaF9pbmZvKQohIAloID0gTlVMTDsKISAg ICAgICBlbHNlCiEgCXsKISAJICBoID0gc3ltX2hhc2hlc1tyX3N5bW5keCAt IHN5bXRhYl9oZHItPnNoX2luZm9dOwohICNpZmRlZiBJTkNMVURFX1NITUVE SUEKISAJICB3aGlsZSAoaC0+cm9vdC50eXBlID09IGJmZF9saW5rX2hhc2hf aW5kaXJlY3QKISAJCSB8fCBoLT5yb290LnR5cGUgPT0gYmZkX2xpbmtfaGFz aF93YXJuaW5nKQohIAkgICAgewohIAkgICAgICBzZWVuX3N0dF9kYXRhbGFi ZWwgfD0gaC0+dHlwZSA9PSBTVFRfREFUQUxBQkVMOwohIAkgICAgICBoID0g KHN0cnVjdCBlbGZfbGlua19oYXNoX2VudHJ5ICopIGgtPnJvb3QudS5pLmxp bms7CiEgCSAgICB9CiEgI2VuZGl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EgCQkg ICAgcC0+Y291bnQgLT0gMTsKISAJCSAgICBpZiAocC0+Y291bnQgPT0gMCkK ISAJCSAgICAgICpwcCA9IHAtPm5leHQ7CiEgCQkgICAgYnJlYWs7CiEgCQkg IH0KISAJICAgIH0KISAJICBicmVhazsKICAKISAJY2FzZSBSX1NIX1BMVDMy OgogICNpZmRlZiBJTkNMVURFX1NITUVESUEKISAJY2FzZSBSX1NIX1BMVF9M T1cxNjoKISAJY2FzZSBSX1NIX1BMVF9NRURMT1cxNjoKISAJY2FzZSBSX1NI X1BMVF9NRURISTE2OgohIAljYXNlIFJfU0hfUExUX0hJMTY6CiAgI2VuZGlm CiEgCSAgaWYgKGggIT0gTlVMTCkKISAJICAgIHsKISAJICAgICAgaWYgKGgt PnBsdC5yZWZjb3VudCA+IDApCiEgCQloLT5wbHQucmVmY291bnQgLT0gMTsK ISAJICAgIH0KISAJICBicmVhazsKICAKISAJY2FzZSBSX1NIX0dPVFBMVDMy OgohICNpZmRlZiBJTkNMVURFX1NITUVESUEKISAJY2FzZSBSX1NIX0dPVFBM VF9MT1cxNjoKISAJY2FzZSBSX1NIX0dPVFBMVF9NRURMT1cxNjoKISAJY2Fz ZSBSX1NIX0dPVFBMVF9NRURISTE2OgohIAljYXNlIFJfU0hfR09UUExUX0hJ MTY6CiEgCWNhc2UgUl9TSF9HT1RQTFQxMEJZNDoKISAJY2FzZSBSX1NIX0dP VFBMVDEwQlk4OgohICNlbmRpZgohIAkgIGlmIChoICE9IE5VTEwpCiEgCSAg ICB7CiEgCSAgICAgIGlmIChlaC0+Z290cGx0X3JlZmNvdW50ID4gMCkKISAJ CXsKISAJCSAgZWgtPmdvdHBsdF9yZWZjb3VudCAtPSAxOwohIAkJICBpZiAo aC0+cGx0LnJlZmNvdW50ID4gMCkKISAJCSAgICBoLT5wbHQucmVmY291bnQg LT0gMTsKISAJCX0KICAjaWZkZWYgSU5DTFVERV9TSE1FRElBCiEgCSAgICAg IGVsc2UgaWYgKHNlZW5fc3R0X2RhdGFsYWJlbCkKISAJCXsKISAJCSAgaWYg KGVoLT5kYXRhbGFiZWxfZ290LnJlZmNvdW50ID4gMCkKISAJCSAgICBlaC0+ ZGF0YWxhYmVsX2dvdC5yZWZjb3VudCAtPSAxOwohIAkJfQogICNlbmRpZgoh IAkgICAgICBlbHNlIGlmIChoLT5nb3QucmVmY291bnQgPiAwKQohIAkJaC0+ Z290LnJlZmNvdW50IC09IDE7CiEgCSAgICB9CiEgCSAgZWxzZSBpZiAobG9j YWxfZ290X3JlZmNvdW50cyAhPSBOVUxMKQohIAkgICAgewohICNpZmRlZiBJ TkNMVURFX1NITUVESUEKISAJICAgICAgaWYgKHJlbC0+cl9hZGRlbmQgJiAx KQohIAkJewohIAkJICBpZiAobG9jYWxfZ290X3JlZmNvdW50c1tzeW10YWJf aGRyLT5zaF9pbmZvICsgcl9zeW1uZHhdID4gMCkKISAJCSAgICBsb2NhbF9n b3RfcmVmY291bnRzW3N5bXRhYl9oZHItPnNoX2luZm8gKyByX3N5bW5keF0g LT0gMTsKISAJCX0KISAJICAgICAgZWxzZQohICNlbmRpZgohIAkJaWYgKGxv Y2FsX2dvdF9yZWZjb3VudHNbcl9zeW1uZHhdID4gMCkKISAJCSAgbG9jYWxf Z290X3JlZmNvdW50c1tyX3N5bW5keF0gLT0gMTsKISAJICAgIH0KISAJICBi cmVhazsKICAKISAJZGVmYXVsdDoKISAJICBicmVhazsKISAJfQohICAgICB9 CiAgCiAgICByZXR1cm4gdHJ1ZTsKICB9CioqKioqKioqKioqKioqKiBzaF9l bGZfY29weV9pbmRpcmVjdF9zeW1ib2wgKGJlZCwgZGlyLCBpCioqKiA1MzQ5 LDUzNTQgKioqKgotLS0gNTQwOCw1NDE2IC0tLS0KICAgICAgIHN0cnVjdCBl bGZfbGlua19oYXNoX2VudHJ5ICpkaXIsICppbmQ7CiAgewogICAgc3RydWN0 IGVsZl9zaF9saW5rX2hhc2hfZW50cnkgKmVkaXIsICplaW5kOworICNpZmRl ZiBJTk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5bW5keDsKICAKICAgICAgICByX3N5bW5k eCA9IEVMRjMyX1JfU1lNIChyZWwtPnJfaW5mbyk7CiAgICAgICAgaWYgKHJf c3ltbmR4IDwgc3ltdGFiX2hkci0+c2hfaW5mbykKICAJaCA9IE5VTEw7CiAg ICAgICAgZWxzZQohIAloID0gc3ltX2hhc2hlc1tyX3N5bW5keCAtIHN5bXRh Yl9oZHItPnNoX2luZm9dOwogIAogICAgICAgIC8qIFNvbWUgcmVsb2NzIHJl cXVpcmUgYSBnbG9iYWwgb2Zmc2V0IHRhYmxlLiAgKi8KICAgICAgICBpZiAo aHRhYi0+c2dvdCA9PSBOVUxMKQotLS0gNTUwNyw1NTMxIC0tLS0KICAgICAg ewogICAgICAgIHN0cnVjdCBlbGZfbGlua19oYXNoX2VudHJ5ICpoOwogICAg ICAgIHVuc2lnbmVkIGxvbmcgcl9zeW1uZHg7CisgI2lmZGVmIElOQ0xVREVf U0hNRURJQQorICAgICAgIGludCBzZWVuX3N0dF9kYXRhbGFiZWwgPSAwOwor ICNlbmRpZgogIAogICAgICAgIHJfc3ltbmR4ID0gRUxGMzJfUl9TWU0gKHJl bC0+cl9pbmZvKTsKICAgICAgICBpZiAocl9zeW1uZHggPCBzeW10YWJfaGRy LT5zaF9pbmZvKQogIAloID0gTlVMTDsKICAgICAgICBlbHNlCiEgCXsKISAJ ICBoID0gc3ltX2hhc2hlc1tyX3N5bW5keCAtIHN5bXRhYl9oZHItPnNoX2lu Zm9dOwohICNpZmRlZiBJTkNMVURFX1NITUVESUEKISAJICB3aGlsZSAoaC0+ cm9vdC50eXBlID09IGJmZF9saW5rX2hhc2hfaW5kaXJlY3QKISAJCSB8fCBo LT5yb290LnR5cGUgPT0gYmZkX2xpbmtfaGFzaF93YXJuaW5nKQohIAkgICAg ewohIAkgICAgICBzZWVuX3N0dF9kYXRhbGFiZWwgfD0gaC0+dHlwZSA9PSBT VFRfREFUQUxBQkVMOwohIAkgICAgICBoID0gKHN0cnVjdCBlbGZfbGlua19o YXNoX2VudHJ5ICopIGgtPnJvb3QudS5pLmxpbms7CiEgCSAgICB9CiEgI2Vu ZGlmCiEgCX0KICAKICAgICAgICAvKiBTb21lIHJlbG9jcyByZXF1aXJlIGEg Z2xvYmFsIG9mZnNldCB0YWJsZS4gICovCiAgICAgICAgaWYgKGh0YWItPnNn b3QgPT0gTlVMTCkKKioqKioqKioqKioqKioqIHNoX2VsZl9jaGVja19yZWxv Y3MgKGFiZmQsIGluZm8sIHNlYywgcmUKKioqIDU1MTEsNTUxNyAqKioqCiAg CWNhc2UgUl9TSF9HT1QxMEJZODoKICAjZW5kaWYKICAJICBpZiAoaCAhPSBO VUxMKQohIAkgICAgaC0+Z290LnJlZmNvdW50ICs9IDE7CiAgCSAgZWxzZQog IAkgICAgewogIAkgICAgICBiZmRfc2lnbmVkX3ZtYSAqbG9jYWxfZ290X3Jl ZmNvdW50czsKLS0tIDU1OTYsNTYxMCAtLS0tCiAgCWNhc2UgUl9TSF9HT1Qx MEJZODoKICAjZW5kaWYKICAJICBpZiAoaCAhPSBOVUxMKQohIAkgICAgewoh ICNpZmRlZiBJTkNMVURFX1NITUVESUEKISAJICAgICAgaWYgKHNlZW5fc3R0 X2RhdGFsYWJlbCkKISAJCSgoc3RydWN0IGVsZl9zaF9saW5rX2hhc2hfZW50 cnkgKikgaCktPmRhdGFsYWJlbF9nb3QucmVmY291bnQKISAJCSAgKz0gMTsK ISAJICAgICAgZWxzZQohICNlbmRpZgohIAkJaC0+Z290LnJlZmNvdW50ICs9 IDE7CiEgCSAgICB9CiAgCSAgZWxzZQogIAkgICAgewogIAkgICAgICBiZmRf c2lnbmVkX3ZtYSAqbG9jYWxfZ290X3JlZmNvdW50czsKKioqKioqKioqKioq KioqIHNoX2VsZl9jaGVja19yZWxvY3MgKGFiZmQsIGluZm8sIHNlYywgcmUK KioqIDU1MzYsNTU0MiAqKioqCiAgCQkgICAgcmV0dXJuIGZhbHNlOwogIAkJ ICBlbGZfbG9jYWxfZ290X3JlZmNvdW50cyAoYWJmZCkgPSBsb2NhbF9nb3Rf cmVmY291bnRzOwogIAkJfQohIAkgICAgICBsb2NhbF9nb3RfcmVmY291bnRz W3Jfc3ltbmR4XSArPSAxOwogIAkgICAgfQogIAkgIGJyZWFrOwogIAotLS0g NTYyOSw1NjQwIC0tLS0KICAJCSAgICByZXR1cm4gZmFsc2U7CiAgCQkgIGVs Zl9sb2NhbF9nb3RfcmVmY291bnRzIChhYmZkKSA9IGxvY2FsX2dvdF9yZWZj b3VudHM7CiAgCQl9CiEgI2lmZGVmIElOQ0xVREVfU0hNRURJQQohIAkgICAg ICBpZiAocmVsLT5yX2FkZGVuZCAmIDEpCiEgCQlsb2NhbF9nb3RfcmVmY291 bnRzW3N5bXRhYl9oZHItPnNoX2luZm8gKyByX3N5bW5keF0gKz0gMTsKISAJ ICAgICAgZWxzZQohICNlbmRpZgohIAkJbG9jYWxfZ290X3JlZmNvdW50c1ty X3N5bW5keF0gKz0gMTsKICAJICAgIH0KICAJICBicmVhazsKICAKKioqKioq KioqKioqKioqIHNoX2VsZl9maW5pc2hfZHluYW1pY19zeW1ib2wgKG91dHB1 dF9iZmQKKioqIDYwMzYsNjA0MSAqKioqCi0tLSA2MTM0LDYxOTMgLS0tLQog IAkJCQkgICsgc3JlbC0+cmVsb2NfY291bnQpKTsKICAgICAgICArK3NyZWwt PnJlbG9jX2NvdW50OwogICAgICB9CisgCisgI2lmZGVmIElOQ0xVREVfU0hN RURJQQorICAgeworICAgICBzdHJ1Y3QgZWxmX3NoX2xpbmtfaGFzaF9lbnRy eSAqZWg7CisgCisgICAgIGVoID0gKHN0cnVjdCBlbGZfc2hfbGlua19oYXNo X2VudHJ5ICopIGg7CisgICAgIGlmIChlaC0+ZGF0YWxhYmVsX2dvdC5vZmZz ZXQgIT0gKGJmZF92bWEpIC0xKQorICAgICAgIHsKKyAJYXNlY3Rpb24gKnNn b3Q7CisgCWFzZWN0aW9uICpzcmVsOworIAlFbGZfSW50ZXJuYWxfUmVsYSB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mxhZ3MgJiBFTEZfTElO S19IQVNIX0RFRl9SRUdVTEFSKSkKKyAJICB7CisgCSAgICByZWwucl9pbmZv ID0gRUxGMzJfUl9JTkZPICgwLCBSX1NIX1JFTEFUSVZFKTsKKyAJICAgIHJl bC5yX2FkZGVuZCA9IChoLT5yb290LnUuZGVmLnZhbHVlCisgCQkJICAgICsg aC0+cm9vdC51LmRlZi5zZWN0aW9uLT5vdXRwdXRfc2VjdGlvbi0+dm1hCisg CQkJICAgICsgaC0+cm9vdC51LmRlZi5zZWN0aW9uLT5vdXRwdXRfb2Zmc2V0 KTsKKyAJICB9CisgCWVsc2UKKyAJICB7CisgCSAgICBiZmRfcHV0XzMyIChv dXRwdXRfYmZkLCAoYmZkX3ZtYSkgMCwgc2dvdC0+Y29udGVudHMKKyAJCQkr IGVoLT5kYXRhbGFiZWxfZ290Lm9mZnNldCk7CisgCSAgICByZWwucl9pbmZv ID0gRUxGMzJfUl9JTkZPIChoLT5keW5pbmR4LCBSX1NIX0dMT0JfREFUKTsK KyAJICAgIHJlbC5yX2FkZGVuZCA9IDA7CisgCSAgfQorIAorIAliZmRfZWxm MzJfc3dhcF9yZWxvY2Ffb3V0IChvdXRwdXRfYmZkLCAmcmVsLAorIAkJCQkg ICAoKEVsZjMyX0V4dGVybmFsX1JlbGEgKikgc3JlbC0+Y29udGVudHMKKyAJ CQkJICAgICsgc3JlbC0+cmVsb2NfY291bnQpKTsKKyAJKytzcmVsLT5yZWxv Y19jb3VudDsKKyAgICAgICB9CisgICB9CisgI2VuZGlmCiAgCiAgICBpZiAo KGgtPmVsZl9saW5rX2hhc2hfZmxhZ3MgJiBFTEZfTElOS19IQVNIX05FRURT X0NPUFkpICE9IDApCiAgICAgIHsK ------_=_NextPart_001_01C270B8.EAD78944--