summaryrefslogblamecommitdiff
path: root/user/grub/grub2-accept-empty-module.patch
blob: f4f62d433d8e56718ccd6e590bc1edab97b27be4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                           

                                                            

              

                                                                                     


                                                                          
                                                                                    
From: Michael Matz <matz@suse.com>

Accept empty modules

For the Xen platform the all_video.mod module is empty.
With old binutils the .symtab section remained (containing
only section symbols), so the check didn't trigger, but starting
with binutils 2.27 not even a .symtab remains.  As there are
also no relocations that's no problem (and that is checked
independendly).
--- grub-2.02~beta3/util/grub-module-verifierXX.c.mm	2016-02-11 10:57:41.000000000 +0000
+++ grub-2.02~beta3/util/grub-module-verifierXX.c	2016-08-31 15:26:36.000000000 +0000
@@ -225,7 +225,8 @@ check_symbols (const struct grub_module_
       s = find_section (arch, e, ".moddeps");
 
       if (!s)
-	grub_util_error ("%s: no symbol table and no .moddeps section", modname);
+	/*grub_util_error ("%s: no symbol table and no .moddeps section", modname);*/
+	return; /* An empty module happens for all_video.module for Xen */
 
       if (!s->sh_size)
 	grub_util_error ("%s: no symbol table and empty .moddeps section", modname);