Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2006-05

smrtlinking on arm-wince

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Vincent Snijders

Hi,

I was testing how bin arm-wince lcl applications are and wanted to test with smartlinking.

First try: using LD as linker
This didn't work, because even if I do make rtl OPT="-CX", no lib*.a files are created.

Second try: using internal linker, which presumably doesn't need the lib*.a files, but may not be working on arm-wince.
This failed with the errors below.

How can I created a smartlinked executable for arm-wince?

Vincent

Hint: Start of reading config file C:\FPC\2.1.1\bin\i386-Win32\fpc.cfg Hint: End of reading config file C:\FPC\2.1.1\bin\i386-Win32\fpc.cfg Warning: You are using the obsolete switch -OG
Free Pascal Compiler version 2.1.1 [2006/05/16] for arm Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: WinCE for ARM
Compiling C:\DOCUME~1\VINCEN~1\LOCALS~1\Temp\project1.lpr Compiling Unit1.pas
Assembling unit1
Assembling project1
Linking C:\DOCUME~1\VINCEN~1\LOCALS~1\Temp\project1.exe project1.lpr(19) Error: Failed reading coff file, illegal reloctype $0003 while reading C:\DOCUME~1\VINCEN~1\LOCALS~1\Temp\project1.o

<snipped a lot more>

project1.lpr(19) Fatal: There were 50 errors compiling module, stopping

Reply by email

Daniël Mantione
to Vincent Snijders

Op Tue, 16 May 2006, schreef Vincent Snijders:

Show quoted text 14 lines
Hi, I was testing how bin arm-wince lcl applications are and wanted to test with smartlinking. First try: using LD as linker This didn't work, because even if I do make rtl OPT="-CX", no lib*.a files are created. Second try: using internal linker, which presumably doesn't need the lib*.a files, but may not be working on arm-wince. This failed with the errors below. How can I created a smartlinked executable for arm-wince?

Please check this thread by Francesco Lombardi:

http://community.freepascal.org:10000/bboards/message?message_id=227742&forum_id=24105

Daniël

Reply by email

Florian Klaempfl
to Daniël Mantione
Daniël Mantione wrote 21 lines
Op Tue, 16 May 2006, schreef Vincent Snijders: > Hi, > > I was testing how bin arm-wince lcl applications are and wanted to test with > smartlinking. > > First try: using LD as linker > This didn't work, because even if I do make rtl OPT="-CX", no lib*.a files are > created. > > Second try: using internal linker, which presumably doesn't need the lib*.a > files, but may not be working on arm-wince. > This failed with the errors below. > > How can I created a smartlinked executable for arm-wince? Please check this thread by Francesco Lombardi: http://community.freepascal.org:10000/bboards/message?message_id=227742&forum_id=24105

The flag tf_smartlink_sections isn't set for WinCE yet. I set it now, maybe the WinCE people can check if things still work.

Reply by email

Vincent Snijders
to Oro06
Oro06 wrote
using -CX, rtl built fine .a are created then progs compiled with $SMARTLINK ON compile and run

Do you see any difference when you using smartlinking or not?

I tried the following test program:
================
program Project1;

{$mode objfpc}{$H+}

uses
Windows, Classes

   { add your units here };
begin
end.
================
Compiled with -Xs to strip debug info.

With -XX: 572 kB
With -XS: 572 kB

So, I doubt smartlinking is successful.

Vincent

Reply by email

Oro06
How can I check this?

binutils is our friend :)

Show quoted text 7 lines
I think the problem is not as much the imported functions from the windows unit, although that is interesting too, but more the used functions / procedures and methods from the classes unit. Do you know how I can check, that things are left out if I use smartlinking, (or added if I explicitly use static linking)?

110% agreed , but imported functions are quickly checkable

arm-wince-pe-objdump -p MyTestProg.exe

Reply by email