Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGzpm-0006G8-Cc for qemu-devel@nongnu.org; Thu, 10 Jul 2008 13:21:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGzpm-0006Fr-1z for qemu-devel@nongnu.org; Thu, 10 Jul 2008 13:21:34 -0400 Received: from [199.232.76.173] (port=59204 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGzpl-0006Fm-QR for qemu-devel@nongnu.org; Thu, 10 Jul 2008 13:21:33 -0400 Received: from savannah.gnu.org ([199.232.41.3]:38889 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KGzpl-0008K0-JE for qemu-devel@nongnu.org; Thu, 10 Jul 2008 13:21:33 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KGzpk-0008PL-Mb for qemu-devel@nongnu.org; Thu, 10 Jul 2008 17:21:32 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KGzpk-0008PF-5m for qemu-devel@nongnu.org; Thu, 10 Jul 2008 17:21:32 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Thu, 10 Jul 2008 17:21:32 +0000 Subject: [Qemu-devel] [4867] Link ARM prologue closer to code segment to avoid a build failure Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 4867 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4867 Author: blueswir1 Date: 2008-07-10 17:21:31 +0000 (Thu, 10 Jul 2008) Log Message: ----------- Link ARM prologue closer to code segment to avoid a build failure Modified Paths: -------------- trunk/arm.ld trunk/exec.c Modified: trunk/arm.ld =================================================================== --- trunk/arm.ld 2008-07-10 17:17:54 UTC (rev 4866) +++ trunk/arm.ld 2008-07-10 17:21:31 UTC (rev 4867) @@ -63,6 +63,7 @@ . = ALIGN(0x100000) + (. & (0x100000 - 1)); .data : { + *(.gen_code) *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS Modified: trunk/exec.c =================================================================== --- trunk/exec.c 2008-07-10 17:17:54 UTC (rev 4866) +++ trunk/exec.c 2008-07-10 17:21:31 UTC (rev 4867) @@ -89,7 +89,19 @@ /* any access to the tbs or the page table must use this lock */ spinlock_t tb_lock = SPIN_LOCK_UNLOCKED; -uint8_t code_gen_prologue[1024] __attribute__((aligned (32))); +#if defined(__arm__) +/* The prologue must be reachable with a direct jump. ARM has a + limited branch range (possibly also PPC and SPARC?) so place it in a + section close to code segment. */ +#define code_gen_section \ + __attribute__((__section__(".gen_code"))) \ + __attribute__((aligned (32))) +#else +#define code_gen_section \ + __attribute__((aligned (32))) +#endif + +uint8_t code_gen_prologue[1024] code_gen_section; uint8_t *code_gen_buffer; unsigned long code_gen_buffer_size; /* threshold to flush the translated code buffer */