Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GTAeJ-0001c6-T0 for mharc-grub-devel@gnu.org; Fri, 29 Sep 2006 01:10:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GTAeH-0001ZD-TY for grub-devel@gnu.org; Fri, 29 Sep 2006 01:10:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GTAeE-0001UQ-DK for grub-devel@gnu.org; Fri, 29 Sep 2006 01:10:57 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GTAeE-0001U6-1q for grub-devel@gnu.org; Fri, 29 Sep 2006 01:10:54 -0400 Received: from [207.69.195.71] (helo=pop-siberian.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GTAjS-0005pe-Qv for grub-devel@gnu.org; Fri, 29 Sep 2006 01:16:18 -0400 Received: from user-0vvdf2d.cable.mindspring.com ([63.246.188.77] helo=diesel.unsanctioned.org) by pop-siberian.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1GTAdt-0000wK-00 for grub-devel@gnu.org; Fri, 29 Sep 2006 01:10:33 -0400 From: Hollis Blanchard To: The development of GRUB 2 In-Reply-To: <1159451113.451bd1e94a4d9@imp1-g19.free.fr> References: <1159443706.451bb4fad4e1a@imp6-g19.free.fr> <87zmck15gp.fsf@xs4all.nl> <1159451113.451bd1e94a4d9@imp1-g19.free.fr> Content-Type: text/plain Date: Fri, 29 Sep 2006 00:10:32 -0500 Message-Id: <1159506632.21826.32.camel@diesel> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 (2.6.3-1.fc5.5) Content-Transfer-Encoding: 7bit Subject: Re: Grub for ia64 - function descriptors 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: Fri, 29 Sep 2006 05:10:58 -0000 On Thu, 2006-09-28 at 15:45 +0200, tgingold@free.fr wrote: > > if (grub_strcmp (name, "grub_mod_init") == 0) > mod->init = (void (*) (grub_dl_t)) sym->st_value; > > This won't work on ia64 AFAIK. Can't this problem be solved with an architecture-specific macro? FWIW, 64-bit PowerPC also uses function descriptors. They look something like: long code_address long table_of_contents long unused The table_of_contents (TOC) value needs to be placed into r2 when jumping at code_address (and of course the old one needs to be restored when returning). I assume IA64 is similar here, and given that, a module_jump function implemented in assembly by each architecture would solve this problem. (Generally speaking, the TOC on ppc64 only varies across separately linked modules.) (This issue does not apply to GRUB on ppc64 systems, since those systems still use 32-bit firmware and thus 32-bit GRUB.) -Hollis