]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* include/grub/dl.h [ASM_FILE]: Adapt for assembly.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 19 Apr 2011 23:37:48 +0000 (01:37 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 19 Apr 2011 23:37:48 +0000 (01:37 +0200)
* grub-core/lib/i386/setjmp.S: Add missing GRUB_MOD_LICENSE.
* grub-core/lib/x86_64/setjmp.S: Likewise.
* grub-core/lib/mips/setjmp.S: Likewise.
* grub-core/lib/powerpc/setjmp.S: Likewise.
* grub-core/lib/sparc64/setjmp.S: Likewise.

ChangeLog
grub-core/lib/i386/setjmp.S
grub-core/lib/mips/setjmp.S
grub-core/lib/powerpc/setjmp.S
grub-core/lib/sparc64/setjmp.S
grub-core/lib/x86_64/setjmp.S
include/grub/dl.h

index 877186e23cd53717f6ebe265349388d2ad6818af..c78ae8cabf45577f17564c9f9b47c48c702430a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-04-20  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * include/grub/dl.h [ASM_FILE]: Adapt for assembly.
+       * grub-core/lib/i386/setjmp.S: Add missing GRUB_MOD_LICENSE.
+       * grub-core/lib/x86_64/setjmp.S: Likewise.
+       * grub-core/lib/mips/setjmp.S: Likewise.
+       * grub-core/lib/powerpc/setjmp.S: Likewise.
+       * grub-core/lib/sparc64/setjmp.S: Likewise.
+
 2011-04-20  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/lib/efi/datetime.c: Add missing GRUB_MOD_LICENSE.
index a2002ae3d49c9d043a283bfdfa8961d4b33efb91..5b7aa158bcf0f53e1c2202851c8dd42a9e6c16a7 100644 (file)
  */
 
 #include <grub/symbol.h>
+#include <grub/dl.h>
 
        .file   "setjmp.S"
 
+GRUB_MOD_LICENSE ("GPLv3+")
+
        .text
 
 /*
index 8ab6222c4e90991fa33c493e6b0f9f99c0602567..8259c9d22328b770e6bc66555ec09aaa05b1caa0 100644 (file)
  */
 
 #include <grub/symbol.h>
+#include <grub/dl.h>
 
        .file   "setjmp.S"
 
+GRUB_MOD_LICENSE ("GPLv3+")
+
        .text
 
 /*
index 25cbaa3e93707b99d11a3500aaac6c79cddce923..8c7540e3c9c1f4f0665c9c5db604fe3ef2918080 100644 (file)
  */
 
 #include <grub/symbol.h>
+#include <grub/dl.h>
 
        .file   "setjmp.S"
 
+GRUB_MOD_LICENSE ("GPLv3+")
+
        .text
 
 /*
index 0e23ecfa15262629706cd5851c3e3cbfc637151f..5c2ec2cf3a4fcb4ff1828d115ad10683e5215005 100644 (file)
  */
 
 #include <grub/symbol.h>
+#include <grub/dl.h>
 
         .file   "setjmp.S"
 
+GRUB_MOD_LICENSE ("GPLv3+")
+
         .text
 
 /*
index 621b09b93ec818ab1171a79b06ea2cd3ab950a81..b1f1b22cb26340835db6a0c97faf81a439e8e204 100644 (file)
  */
 
 #include <grub/symbol.h>
+#include <grub/dl.h>
 
        .file   "setjmp.S"
 
+GRUB_MOD_LICENSE ("GPLv3+")
+
        .text
 
 /*
index 71db90c8b79adb2e104ef52ae172958f3516e380..6f23f7d63ba856b1179ff0d4937384fe22d50a01 100644 (file)
 #define GRUB_DL_H      1
 
 #include <grub/symbol.h>
+#ifndef ASM_FILE
 #include <grub/err.h>
 #include <grub/types.h>
 #include <grub/elf.h>
+#endif
 
 /*
  * Macros GRUB_MOD_INIT and GRUB_MOD_FINI are also used by build rules
  * to collect module names, so we define them only when they are not
  * defined already.
  */
+#ifndef ASM_FILE
 
 #ifndef GRUB_MOD_INIT
 #define GRUB_MOD_INIT(name)    \
@@ -66,10 +69,20 @@ __asm__ (".section .moddeps\n.asciz \"" #name "\"\n")
 
 #endif
 
+#endif
+
+#ifndef ASM_FILE
+#ifdef APPLE_CC
+#define GRUB_MOD_SECTION(x) "_" #x ", _" #x ""
+#else
+#define GRUB_MOD_SECTION(x) "." #x
+#endif
+#else
 #ifdef APPLE_CC
-#define GRUB_MOD_SECTION(x) "_" x ", _" x ""
+#define GRUB_MOD_SECTION(x) _ ## x , _ ##x 
 #else
-#define GRUB_MOD_SECTION(x) "." x
+#define GRUB_MOD_SECTION(x) . ## x
+#endif
 #endif
 
 /* Me, Vladimir Serbinenko, hereby I add this module check as per new
@@ -80,8 +93,16 @@ __asm__ (".section .moddeps\n.asciz \"" #name "\"\n")
    constitutes linking) and GRUB core being licensed under GPLv3+.
    Be sure to understand your license obligations.
 */
+#ifndef ASM_FILE
+#define GRUB_MOD_LICENSE(license)      \
+  static char grub_module_license[] __attribute__ ((section (GRUB_MOD_SECTION (module_license)), used)) = "LICENSE=" license;
+#else
 #define GRUB_MOD_LICENSE(license)      \
-  static char grub_module_license[] __attribute__ ((section (GRUB_MOD_SECTION ("module_license")), used)) = "LICENSE=" license;
+  .section GRUB_MOD_SECTION(module_license), "a";      \
+  .ascii "LICENSE="; \
+  .ascii license; \
+  .byte 0
+#endif
 
 /* Under GPL license obligations you have to distribute your module
    under GPLv3(+). However, you can also distribute the same code under
@@ -89,6 +110,8 @@ __asm__ (".section .moddeps\n.asciz \"" #name "\"\n")
 */
 #define GRUB_MOD_DUAL_LICENSE(x)
 
+#ifndef ASM_FILE
+
 struct grub_dl_segment
 {
   struct grub_dl_segment *next;
@@ -143,4 +166,6 @@ grub_err_t grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr);
 void grub_arch_dl_init_linker (void);
 #endif
 
+#endif
+
 #endif /* ! GRUB_DL_H */