develooper Front page | perl.perl5.porters | Postings from November 2013

Re: [perl #120365] WinCE build instructions

Thread Previous | Thread Next
From:
Steve Hay
Date:
November 5, 2013 00:08
Subject:
Re: [perl #120365] WinCE build instructions
Message ID:
CADED=K6TjfXqQ-OPtZ14g7r3pssBQLxEaonbSW9gq1buF+qeBg@mail.gmail.com
On 4 November 2013 22:33, Steve Hay <steve.m.hay@googlemail.com> wrote:
> I've done that and the build now gets further but fails when linking
> the main DLL:
>
>         link -dll -def:perldll.def -base:0x28000000 -out:wince-arm-pocket-wce400
> \perl519.dll  -subsystem:windowsce,4.00 -libpath:C:\Dev\Software\celib\wince-arm
> -pocket-wce400-release  -nologo -debug -opt:ref,icf -machine:ARM  -nodefaultlib
>  ws2.lib celib.lib coredll.lib corelibc.lib   wince-arm-pocket-wce400\dll\av.obj
>   wince-arm-pocket-wce400\dll\deb.obj  wince-arm-pocket-wce400\dll\doio.obj  win
> ce-arm-pocket-wce400\dll\doop.obj  wince-arm-pocket-wce400\dll\dump.obj  wince-a
> rm-pocket-wce400\dll\globals.obj  wince-arm-pocket-wce400\dll\gv.obj  wince-arm-
> pocket-wce400\dll\mro.obj  wince-arm-pocket-wce400\dll\hv.obj  wince-arm-pocket-
> wce400\dll\locale.obj  wince-arm-pocket-wce400\dll\keywords.obj  wince-arm-pocke
> t-wce400\dll\mathoms.obj  wince-arm-pocket-wce400\dll\mg.obj  wince-arm-pocket-w
> ce400\dll\numeric.obj  wince-arm-pocket-wce400\dll\op.obj  wince-arm-pocket-wce4
> 00\dll\pad.obj  wince-arm-pocket-wce400\dll\perl.obj  wince-arm-pocket-wce400\dl
> l\perlapi.obj  wince-arm-pocket-wce400\dll\perlio.obj  wince-arm-pocket-wce400\d
> ll\perly.obj  wince-arm-pocket-wce400\dll\pp.obj  wince-arm-pocket-wce400\dll\pp
> _ctl.obj  wince-arm-pocket-wce400\dll\pp_hot.obj  wince-arm-pocket-wce400\dll\pp
> _pack.obj  wince-arm-pocket-wce400\dll\pp_sort.obj  wince-arm-pocket-wce400\dll\
> pp_sys.obj  wince-arm-pocket-wce400\dll\reentr.obj  wince-arm-pocket-wce400\dll\
> regcomp.obj  wince-arm-pocket-wce400\dll\regexec.obj  wince-arm-pocket-wce400\dl
> l\run.obj  wince-arm-pocket-wce400\dll\scope.obj  wince-arm-pocket-wce400\dll\sv
> .obj  wince-arm-pocket-wce400\dll\taint.obj  wince-arm-pocket-wce400\dll\toke.ob
> j  wince-arm-pocket-wce400\dll\universal.obj  wince-arm-pocket-wce400\dll\utf8.o
> bj  wince-arm-pocket-wce400\dll\util.obj  wince-arm-pocket-wce400\dll\win32threa
> d.obj  wince-arm-pocket-wce400\dll\wince.obj  wince-arm-pocket-wce400\dll\win32i
> o.obj  wince-arm-pocket-wce400\dll\wincesck.obj  wince-arm-pocket-wce400\dll\per
> llib.obj  wince-arm-pocket-wce400\dll\DynaLoader.obj wince-arm-pocket-wce400\dll
> \malloc.obj
> LINK : fatal error LNK1181: cannot open input file 'ws2.lib'
> NMAKE : fatal error U1077: 'link' : return code '0x49d'
> Stop.

This is the same problem that caused stdarg.h to go missing: PLATFORM
is already set to HPD on my machine, so the WCEARMV4.BAT file set the
wrong LIB path too -- the non-existent C:\Program Files (x86)\Windows
CE Tools\WCE400\HPD\lib\ARMV4 rather than C:\Program Files
(x86)\Windows CE Tools\WCE400\STANDARDSDK\lib\ARMV4.

With that corrected, the build now succeeds and I get the expected
perl.exe, perl519.dll and XS module DLLs :-)

I have nothing to run this on, but the perl.exe header is as epxected
according to your instructions:

C:\Dev\Git\perl\win32>dumpbin /headers wince-arm-pocket-wce400\perl.exe
Microsoft (R) COFF/PE Dumper Version 6.24.1243
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file wince-arm-pocket-wce400\perl.exe

PE signature found

File Type: EXECUTABLE IMAGE

FILE HEADER VALUES
             1C0 machine (ARM)
               5 number of sections
        52783306 time date stamp Mon Nov 04 23:51:34 2013
               0 file pointer to symbol table
               0 number of symbols
              E0 size of optional header
             10F characteristics
                   Relocations stripped
                   Executable
                   Line numbers stripped
                   Symbols stripped
                   32 bit word machine

OPTIONAL HEADER VALUES
             10B magic # (PE32)
            6.24 linker version
            3E00 size of code
            2400 size of initialized data
               0 size of uninitialized data
            4B5C entry point (00014B5C)
            1000 base of code
            5000 base of data
           10000 image base (00010000 to 00018FFF)
            1000 section alignment
             200 file alignment
            4.00 operating system version
            0.00 image version
            4.00 subsystem version
               0 Win32 version
            9000 size of image
             400 size of headers
               0 checksum
               9 subsystem (Windows CE GUI)
               0 DLL characteristics
          100000 size of stack reserve
            1000 size of stack commit
          100000 size of heap reserve
            1000 size of heap commit
               0 loader flags
              10 number of directories
               0 [       0] RVA [size] of Export Directory
            50D0 [      50] RVA [size] of Import Directory
            8000 [     FB0] RVA [size] of Resource Directory
            7000 [     220] RVA [size] of Exception Directory
               0 [       0] RVA [size] of Certificates Directory
               0 [       0] RVA [size] of Base Relocation Directory
            5000 [      1C] RVA [size] of Debug Directory
               0 [       0] RVA [size] of Architecture Directory
               0 [       0] RVA [size] of Global Pointer Directory
               0 [       0] RVA [size] of Thread Storage Directory
               0 [       0] RVA [size] of Load Configuration Directory
               0 [       0] RVA [size] of Bound Import Directory
            6000 [     124] RVA [size] of Import Address Table Directory
               0 [       0] RVA [size] of Delay Import Directory
               0 [       0] RVA [size] of COM Descriptor Directory
               0 [       0] RVA [size] of Reserved Directory


SECTION HEADER #1
   .text name
    3D54 virtual size
    1000 virtual address (00011000 to 00014D53)
    3E00 size of raw data
     400 file pointer to raw data (00000400 to 000041FF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
60000020 flags
         Code
         Execute Read

SECTION HEADER #2
  .rdata name
     45E virtual size
    5000 virtual address (00015000 to 0001545D)
     600 size of raw data
    4200 file pointer to raw data (00004200 to 000047FF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
40000040 flags
         Initialized Data
         Read Only

  Debug Directories

        Time Type       Size      RVA  Pointer
    -------- ------ -------- -------- --------
    52783306 cv           47 00005074     4274    Format: NB10, 52783306, 1, C:\
Dev\Git\perl\win32\wince-arm-pocket-wce400\perl.pdb

SECTION HEADER #3
   .data name
     868 virtual size
    6000 virtual address (00016000 to 00016867)
     400 size of raw data
    4800 file pointer to raw data (00004800 to 00004BFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
C0000040 flags
         Initialized Data
         Read Write

SECTION HEADER #4
  .pdata name
     220 virtual size
    7000 virtual address (00017000 to 0001721F)
     400 size of raw data
    4C00 file pointer to raw data (00004C00 to 00004FFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
40000040 flags
         Initialized Data
         Read Only

SECTION HEADER #5
   .rsrc name
     FB0 virtual size
    8000 virtual address (00018000 to 00018FAF)
    1000 size of raw data
    5000 file pointer to raw data (00005000 to 00005FFF)
       0 file pointer to relocation table
       0 file pointer to line numbers
       0 number of relocations
       0 number of line numbers
40000040 flags
         Initialized Data
         Read Only

  Summary

        1000 .data
        1000 .pdata
        1000 .rdata
        1000 .rsrc
        4000 .text

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About