Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EgQbk-0007ih-4E for mharc-grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EgQbi-0007gs-Ls for grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EgQbg-0007fU-OL for grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgQbg-0007fN-FT for grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:32 -0500 Received: from [207.69.195.71] (helo=pop-siberian.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EgQbg-0000KU-NC for grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:32 -0500 Received: from user-0vvde2g.cable.mindspring.com ([63.246.184.80] helo=[192.168.0.131]) by pop-siberian.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1EgQbf-0002fL-00 for grub-devel@gnu.org; Sun, 27 Nov 2005 12:46:31 -0500 From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: References: Content-Type: text/plain Date: Sun, 27 Nov 2005 11:40:43 -0600 Message-Id: <1133113243.6205.9.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit Subject: Re: PowerPC C++ kernel woes. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2005 17:46:34 -0000 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