qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4867] Link ARM prologue closer to code segment to avoid a


From: Blue Swirl
Subject: [Qemu-devel] [4867] Link ARM prologue closer to code segment to avoid a build failure
Date: Thu, 10 Jul 2008 17:21:32 +0000

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 */






reply via email to

[Prev in Thread] Current Thread [Next in Thread]