All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Wozniak <awozniak@mc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] hello_world crashes U-Boot
Date: Sun, 17 Apr 2005 17:04:48 -0400	[thread overview]
Message-ID: <4262CF70.5020508@mc.com> (raw)
In-Reply-To: <4262B86B.9030602@mc.com>

Hi, I spent more time invstigating and found that when I use {3} as init 
data, U-Boot no longer hangs.

I also captured the hello_world .bin and .map files for the two (OK,BAD) 
cases and found these binary difference:

OK: 00000000:  00 01 82 50 94 21 FF E0 7C 08 02 A6 BF 81 00 10
BAD:00000000:  94 21 FF E0 7C 08 02 A6 BF 81 00 10 90 01 00 24

Interesting that the "entry" location has shifted.

Also, the BAD .map file is missing the following entries:

<snip>
  *(.rodata.rodata.*.gnu.linkonce.r.*)
  .rodata        0x00040260        0x8 hello_world.o

...

  *(.got2)
  .got2          0x00050268        0x4 hello_world.o
<snip>

Could all of this be a GCC bug?  I am running ppc_405-gcc version 3.2.1

Thanks again for any suggestions.


Andrew Wozniak wrote:
> Hi,
> 
> I still need to investigate this further, but figured that a post might 
> encourage some suggestions about this interesting issue.
> 
> hello_word was built with the default Makefile for the PPC440GX and it 
> runs just fine. But when it is modified so that "no" stdio is used and a 
> structure init is attempted, it crashed U-Boot (see attachment) when 
> hello_world returns.
> 
> int hello_world (int argc, char *argv[])
> {
>         struct pci_controller thehose = {0};
> 
>     app_startup(argv);
>     return (0);
> }
> 
> The interesting part is that when one or more stdio functions is added, 
> printf() for example, there is no crash.
> 
> I was hoping that someone else might be able to reproduce this crash.
> 
> My current U-Boot image has about 8 exported functions in addition to 
> the default ones. hello_world was built against this image to insure ABI 
> compatibility.
> 
> Thanks for any suggestions, Andrew
> 
> 
> ------------------------------------------------------------------------
> 
> => go 40004
> ## Starting application at 0x00040004 ...
> ## Application terminated, rc = 0x0
> NIP: 00000000 XER: 00000000 LR: 00000000 REGS: 00365c20 TRAP: 0700 DAR: 00000000
> MSR: 00029000 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00
> 
> GPR00: 00000000 00365D10 0000FFFF 00000000 0000000A 00000001 00000001 8D3F9F08
> GPR08: 003D0900 00000001 877832C6 00000005 00000000 21000000 003F3100 00446000
> GPR16: 80050000 00028100 00000000 80000002 00009000 00365AF8 00000000 00000001
> GPR24: 00365E28 00000000 00365DF8 003C819C 0EFB0311 00000001 003D08FC 00365DF8
> ** Illegal Instruction **
> Call backtrace:
> 00000000 03000000
> Program Check Exception
> NIP: 00000000 XER: 00000000 LR: 00000000 REGS: 00365c20 TRAP: 0700 DAR: 00000000
> MSR: 00029000 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 00
> 
> GPR00: 00000000 00365D10 0000FFFF 00000000 0000000A 00000001 00000001 8D3F9F08
> GPR08: 003D0900 00000001 877832C6 00000005 00000000 21000000 003F3100 00446000
> GPR16: 80050000 00028100 00000000 80000002 00009000 00365AF8 00000000 00000001
> GPR24: 00365E28 00000000 00365DF8 003C819C 0EFB0311 00000001 003D08FC 00365DF8
> ** Illegal Instruction **

      reply	other threads:[~2005-04-17 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-17 19:26 [U-Boot-Users] hello_world crashes U-Boot Andrew Wozniak
2005-04-17 21:04 ` Andrew Wozniak [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=4262CF70.5020508@mc.com \
    --to=awozniak@mc.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.