public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Danny Backx <danny.backx@scarlet.be>
To: binutils <binutils@sourceware.org>
Subject: Sorted out (Pedro's stuff does fix binutils on arm-wince-pe)
Date: Tue, 02 May 2006 22:23:00 -0000	[thread overview]
Message-ID: <1146608575.3796.26.camel@dannypc> (raw)
In-Reply-To: <1146250954.3965.11.camel@dannypc>


[-- Attachment #1.1: Type: text/plain, Size: 2366 bytes --]

Following up on my own post.

The uncertainties I had last Friday about Pedro's submission are gone. I
was having library conflicts. Once these were sorted out, the test
programs all worked. I was mixing newlib and coredll stuff in a bad way.

So for me this boils down to :
- Binutils (CVS and 2.17 pre) is badly broken for arm-wince-pe (aka to
  generate code for a standard Windows CE PDA). GAS and LD work (as in
  "they don't crash"), but they generate broken code.
- Pedro's patches fix the problems known to me.

Evidence is attached (including .s files, .exe files, and full objdump
of the .exe files).

You can compare the "exedump" files to what I described in an earlier
post. Both problems are now gone.

	Danny

P.S. The "evidence" was created with these tools :
dannypc: {24} arm-wince-pe-as --version
GNU assembler 2.17.50 20060427
Copyright 2005 Free Software Foundation, Inc. [...]
This assembler was configured for a target of `arm-wince-pe'.
dannypc: {25} arm-wince-pe-ld --version
GNU ld version 2.17.50 20060427
Copyright 2005 Free Software Foundation, Inc. [...]
dannypc: {26} arm-wince-pe-gcc --version
arm-wince-pe-gcc (GCC) 4.1.0
Copyright (C) 2006 Free Software Foundation, Inc. [...]

	Danny

On Fri, 2006-04-28 at 21:02 +0200, Danny Backx wrote:
> Guys,
> 
> I can confirm that Pedro's work (the binutils-head-wince_edited.diff
> file that he posted) does provide a solution for my problems.
> 
> The solution is only partial, but that may not be a binutils problem.
> 
> Here's the detail :
> - I created a Makefile (attached) to call gcc, gas, and ld in the same
> way as demonstrated by an example from Pedro
> - Pedro's example that just calls MessageBoxW() works with that.
> - My example that calls fopen/fprintf/fclose doesn't do anything.
> - In file2.c I made a mixture between both to call MessageBoxW before
> and after the fopen call. Only the MessageBoxW call before fopen
> happens, the one after is never reached. This is on a PDA, no other
> feedback comes, the process is just gone. This may not be a binutils
> issue at all.
> 
> So I would encourage you to look into Pedro's patch because it
> transforms a clearly broken binutils (on ARM) into one that appears to
> work.
> 
> 	Danny
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

[-- Attachment #1.2: ship.tar.gz --]
[-- Type: application/x-compressed-tar, Size: 17747 bytes --]

[-- Attachment #1.3: typescript --]
[-- Type: text/plain, Size: 3174 bytes --]

Script started on Wed 03 May 2006 00:09:27 CEST
dannypc: {1} make clean
rm -f   dialog.s file1.s file2.s dialog.o file1.o file2.o dialog.exe file1.exe file2.exe dialog.exedump file1.exedump file2.exedump dialog.objdump file1.objdump file2.objdump
dannypc: {2} make dist
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o dialog.s dialog.c
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o file1.s file1.c
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o file2.s file2.c
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o dialog.s dialog.c
/usr/ppc/bin/arm-wince-pe-as -o dialog.o dialog.s
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o file1.s file1.c
/usr/ppc/bin/arm-wince-pe-as -o file1.o file1.s
/usr/ppc/bin/arm-wince-pe-gcc -DUNICODE -D_UNICODE -DWINE_UNICODE_NATIVE -DWINCE   -I/usr/ppc/arm-wince-pe/include -I/usr/ppc/arm-wince-pe/sys-include/windows -e_WinMainCRTStartup              -S -o file2.s file2.c
/usr/ppc/bin/arm-wince-pe-as -o file2.o file2.s
/usr/ppc/bin/arm-wince-pe-ld -e_WinMainCRTStartup                -o dialog.exe dialog.o --major-subsystem-version=4 --minor-subsystem-version=2 -lcoredll -Map dialog.map
/usr/ppc/bin/arm-wince-pe-ld -e_WinMainCRTStartup                -o file1.exe file1.o --major-subsystem-version=4 --minor-subsystem-version=2 -lcoredll -Map file1.map
/usr/ppc/bin/arm-wince-pe-ld -e_WinMainCRTStartup                -o file2.exe file2.o --major-subsystem-version=4 --minor-subsystem-version=2 -lcoredll -Map file2.map
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D dialog.exe > dialog.exedump
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D file1.exe > file1.exedump
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D file2.exe > file2.exedump
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D dialog.o > dialog.objdump
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D file1.o > file1.objdump
/usr/ppc/bin/arm-wince-pe-objdump -x -s -g -D file2.o > file2.objdump
tar cfvz ship.tar.gz Makefile dialog.c file1.c file2.c dialog.s file1.s file2.s dialog.o file1.o file2.o dialog.exe file1.exe file2.exe dialog.exedump file1.exedump file2.exedump dialog.objdump file1.objdump file2.objdump
Makefile
dialog.c
file1.c
file2.c
dialog.s
file1.s
file2.s
dialog.o
file1.o
file2.o
dialog.exe
file1.exe
file2.exe
dialog.exedump
file1.exedump
file2.exedump
dialog.objdump
file1.objdump
file2.objdump
dannypc: {3} ^D\b\b
Script done on Wed 03 May 2006 00:09:34 CEST

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]

      reply	other threads:[~2006-05-02 22:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-29  2:08 binutils on arm - research on Pedro's stuff Danny Backx
2006-05-02 22:23 ` Danny Backx [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1146608575.3796.26.camel@dannypc \
    --to=danny.backx@scarlet.be \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).