2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
* include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__ ((unused))' to `__attribute__ ((used))'. (GRUB_MOD_FINI): Likewise. * kern/dl.c (grub_dl_load_file): Fix null pointer dereference. * genmk.rb (PModule): Assign space to common symbols when linking modules.
This commit is contained in:
parent
777aff3957
commit
b38551dabe
4 changed files with 16 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-01-20 Timothy Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
|
||||
|
||||
* include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
|
||||
((unused))' to `__attribute__ ((used))'.
|
||||
(GRUB_MOD_FINI): Likewise.
|
||||
* kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
|
||||
* genmk.rb (PModule): Assign space to common symbols when linking
|
||||
modules.
|
||||
|
||||
2005-01-20 Marco Gerards <metgerards@student.han.nl>
|
||||
|
||||
* include/grub/mm.h (grub_mm_init_region): Change the type of the
|
||||
|
|
4
genmk.rb
4
genmk.rb
|
@ -117,12 +117,12 @@ UNDSYMFILES += #{undsym}
|
|||
|
||||
#{@name}: #{pre_obj} #{mod_obj}
|
||||
-rm -f $@
|
||||
$(LD) -r -o $@ $^
|
||||
$(LD) -r -d -o $@ $^
|
||||
$(STRIP) --strip-unneeded -K grub_mod_init -K grub_mod_fini -R .note -R .comment $@
|
||||
|
||||
#{pre_obj}: #{objs_str}
|
||||
-rm -f $@
|
||||
$(LD) -r -o $@ $^
|
||||
$(LD) -r -d -o $@ $^
|
||||
|
||||
#{mod_obj}: #{mod_src}
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(#{prefix}_CFLAGS) -c -o $@ $<
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#include <grub/types.h>
|
||||
|
||||
#define GRUB_MOD_INIT \
|
||||
static void grub_mod_init (grub_dl_t mod) __attribute__ ((unused)); \
|
||||
static void grub_mod_init (grub_dl_t mod) __attribute__ ((used)); \
|
||||
static void \
|
||||
grub_mod_init (grub_dl_t mod)
|
||||
|
||||
#define GRUB_MOD_FINI \
|
||||
static void grub_mod_fini (void) __attribute__ ((unused)); \
|
||||
static void grub_mod_fini (void) __attribute__ ((used)); \
|
||||
static void \
|
||||
grub_mod_fini (void)
|
||||
|
||||
|
|
|
@ -560,6 +560,9 @@ grub_dl_load_file (const char *filename)
|
|||
goto failed;
|
||||
|
||||
mod = grub_dl_load_core (core, size);
|
||||
if (! mod)
|
||||
goto failed;
|
||||
|
||||
mod->ref_count = 0;
|
||||
|
||||
failed:
|
||||
|
|
Loading…
Reference in a new issue