]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/lib/reed_solomon.c: Use section _text, _text rather than
authorVladimir Serbinenko <phcoder@gmail.com>
Sun, 24 Nov 2013 04:14:11 +0000 (05:14 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 24 Nov 2013 04:14:11 +0000 (05:14 +0100)
.text when compiling for Apple.

ChangeLog
grub-core/lib/reed_solomon.c

index 27157a454d18b23d0e277439a873257a4aadc364..c284982e53eb1333fd8f5a570528fc42a9a535dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/lib/reed_solomon.c: Use section _text, _text rather than
+       .text when compiling for Apple.
+
 2013-11-24  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/term/arc/console.c: Add missing cast to silence warning.
index ab1b4e59e43d65e66408759b37590ecc4bb9e979..7263cbc0463ead69283ffb8a33d1fc1b5ebbd19d 100644 (file)
@@ -69,16 +69,23 @@ typedef grub_uint8_t gf_single_t;
 #define GF_POLYNOMIAL 0x1d
 #define GF_INVERT2 0x8e
 #if defined (STANDALONE) && !defined (TEST)
-static gf_single_t * const gf_powx __attribute__ ((section(".text"))) = (void *) 0x100000;
-static gf_single_t * const gf_powx_inv __attribute__ ((section(".text"))) = (void *) 0x100200;
-static int *const chosenstat __attribute__ ((section(".text"))) = (void *) 0x100300;
-static gf_single_t *const sigma __attribute__ ((section(".text"))) = (void *) 0x100700;
-static gf_single_t *const errpot __attribute__ ((section(".text"))) = (void *) 0x100800;
-static int *const errpos __attribute__ ((section(".text"))) = (void *) 0x100900;
-static gf_single_t *const sy __attribute__ ((section(".text"))) = (void *) 0x100d00;
-static gf_single_t *const mstat __attribute__ ((section(".text"))) = (void *) 0x100e00;
-static gf_single_t *const errvals __attribute__ ((section(".text"))) = (void *) 0x100f00;
-static gf_single_t *const eqstat __attribute__ ((section(".text"))) = (void *) 0x101000;
+
+#ifdef __APPLE__
+#define ATTRIBUTE_TEXT __attribute__ ((section("_text,_text")))
+#else
+#define ATTRIBUTE_TEXT __attribute__ ((section(".text")))
+#endif
+
+static gf_single_t * const gf_powx ATTRIBUTE_TEXT = (void *) 0x100000;
+static gf_single_t * const gf_powx_inv ATTRIBUTE_TEXT = (void *) 0x100200;
+static int *const chosenstat ATTRIBUTE_TEXT = (void *) 0x100300;
+static gf_single_t *const sigma ATTRIBUTE_TEXT = (void *) 0x100700;
+static gf_single_t *const errpot ATTRIBUTE_TEXT = (void *) 0x100800;
+static int *const errpos ATTRIBUTE_TEXT = (void *) 0x100900;
+static gf_single_t *const sy ATTRIBUTE_TEXT = (void *) 0x100d00;
+static gf_single_t *const mstat ATTRIBUTE_TEXT = (void *) 0x100e00;
+static gf_single_t *const errvals ATTRIBUTE_TEXT = (void *) 0x100f00;
+static gf_single_t *const eqstat ATTRIBUTE_TEXT = (void *) 0x101000;
 /* Next available address: (void *) 0x112000.  */
 #else