[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PowerPC C++ kernel woes.
From: |
Hollis Blanchard |
Subject: |
Re: PowerPC C++ kernel woes. |
Date: |
Sun, 27 Nov 2005 11:40:43 -0600 |
On Sat, 2005-11-26 at 18:42 -0600, Andrei Warkentin wrote:
> I've been trying to get some C++ running (now that I can print
> "Hello
> World" from OF, I'd like to move my "Hello World" C++ kernel to
> PowerPC), but it has been without much success.
> I've finally figured out that there are these small data sections
> which I was not taking care of in my ld script (sdata, sbss, sdata2,
> sbss2).
I'd suggest starting with the system-provided linker script and modify
that as needed, rather than trying to write your own from scratch.
> AFAIK, some default ld-script is
> used while building GRUB2. Am I correct? Is this the standard ld-
> script used to be exec-objects under PPCLinux?
Yes, GRUB uses the (unmodified) default linker script (see ld -verbose).
> My other question is one of alignment. Looking at various
> PPC-related
> ld-scripts I found through Google, a lot seem concerned with
> aligning
> data/bss by 4 bytes or by 8. Is there any reason for this? AFAIK,
> the
> default linux one does not care about alignment a whole lot. As far
> as I understand, PPC can cope with misaligned data in hardware.
Alignment is important to hardware. I have personally dealt with a very
difficult-to-debug problem where the stack was misaligned. Different
PowerPC can fix up different misaligned accesses in hardware, but always
with a performance impact. You should align anything that needs
alignment.
My only other advice is that this is not a good place to ask these
questions. You might try linuxppc-dev or the binutils list.
-Hollis