• 从32bit迁移到64bit[2]


    >> 如何查看一个DLL是不是64bit

    在迁移过程中,需要编译X64的QT。因为编译64bit的方法与32bit一样,不同的就是在调用vcvasall.bat的参数。

    ---------------------------------------------------------------------------

    call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" amd64
    subst s: /d
    subst s: f:/SolidMCP
    cd /d S:\Components\CPlusPlus\QT\QT_4.7.3_Win64
    configure -fast -opensource -declarative -confirm-license -platform win32-msvc2008 
    nmake
    md temp
    move lib\*.pdb temp
    nmake clean
    move temp\*.pdb lib

    ---------------------------------------------------------------------------

    因为编译的结果取决于一个小小的参数,自然有些心里发毛,自然Build结束之后有必要查看一把,到底是不是build了64bit。

    Visual Studio自带的dumpbin可以干这个事情,而且还能dump出PE image中的Segments 的一些信息:

    C:\Program Files (x86)\Microsoft Visual Studio 9.0\vc\bin>dumpbin /headers  F:\SolidMCP\Components\CPlusPlus\QT\QT_4.6.2_Win64\bin\QtGui4.dll  >c:\dump.txt

    -----------------------------------------------------------------------------------

    Microsoft (R) COFF/PE Dumper Version 9.00.30729.01
    Copyright (C) Microsoft Corporation.  All rights reserved.

    Dump of file F:\SolidMCP\Components\CPlusPlus\QT\QT_4.6.2_Win64\bin\QtGui4.dll

    PE signature found
    File Type: DLL


    FILE HEADER VALUES
                8664 machine (x64)
                   6 number of sections
            4E4BD9D6 time date stamp Wed Aug 17 23:10:14 2011
                   0 file pointer to symbol table
                   0 number of symbols
                  F0 size of optional header
                2022 characteristics
                       Executable
                       Application can handle large (>2GB) addresses
                       DLL

    OPTIONAL HEADER VALUES
                 20B magic # (PE32+)
                9.00 linker version
              64EE00 size of code
             
    .... [200 words are skipped]

    SECTION HEADER #1
       .text name
      64EC61 virtual size
        1000 virtual address (0000000065001000 to 000000006564FC60)
      64EE00 size of raw data
        
    .... [200 words are skipped]

    SECTION HEADER #2
      .rdata name
      2FB104 virtual size
      650000 virtual address (0000000065650000 to 000000006594B103)
      2FB200 size of raw data
     
    .... [200 words are skipped]

    SECTION HEADER #3
       .data name
        FBD0 virtual size
      94C000 virtual address (000000006594C000 to 000000006595BBCF)
       
    .... [200 words are skipped]

    SECTION HEADER #4
      .pdata name
       7A154 virtual size
      95C000 virtual address (000000006595C000 to 00000000659D6153)
      
    .... [200 words are skipped]

    SECTION HEADER #5
       .rsrc name
         5C4 virtual size
      9D7000 virtual address (00000000659D7000 to 00000000659D75C3)
        
    .... [200 words are skipped]

    SECTION HEADER #6
      .reloc name
       10C66 virtual size
      9D8000 virtual address (00000000659D8000 to 00000000659E8C65)
      
    .... [200 words are skipped]

      Summary

           10000 .data
           7B000 .pdata
          2FC000 .rdata
           11000 .reloc
            1000 .rsrc
          64F000 .text
    -----------------------------------------------------------------------------------

  • 相关阅读:
    Spring MVC 核心组件详解
    Spring MVC 入门就这一篇
    Spring 事务解决方案
    【UGUI源码分析】Unity遮罩之Mask详细解读
    游戏开发中不同时区下的时间问题
    ARTS第十三周(阅读Tomcat源码)
    Win10 电脑安装.NET低版本提示“这台计算机中已经安装了 .NET Framwork 4.6.2或版本更高的更新”问题
    Dynamics 365 Setup 提示SqlServer 存在
    Dynamics CRM "Verification of prerequisites for Domain Controller promotion failed. Certificate Server is installed."
    Dynamics CRM
  • 原文地址:https://www.cnblogs.com/piaoger/p/2097922.html
Copyright © 2020-2023  润新知