All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Warnings in kern/dl.c
@ 2008-07-18 14:14 chaac
  2008-07-18 15:20 ` Pavel Roskin
  0 siblings, 1 reply; 9+ messages in thread
From: chaac @ 2008-07-18 14:14 UTC (permalink / raw)
  To: The development of GRUB 2

Pavel Roskin [proski@gnu.org] kirjoitti: 
> The warnings could be suppressed somehow, but I don't think it's the  
> right thing to do.  64-bit grub-emu cannot load 32-bit modules (and  
> vice versa).  64-bit grub-emu could load 64-bit modules in principle,  
> although we don't compile them.   We could compile special grub-emu  
> modules, but I would not spend any serious effort on it.

Hi,

I think that using grub-emu might be a good idea for testing. I think there should be grub-emu architecture that could be compiled and in example there would be grub-emu specific disk layer, input layer and so on. So we could use grub-emu almost as same way we can do in real runtime environment. I know Marco will be using grub-emu like this on his GSoC project and I think it is a good thing too. But it needs some work of course.

We could do some special testing framework using this method. Eg. we could drive user input from special user input module that can be controlled from outside.

So please, do not at least remove support for using 64bit modules on 64bit systems :) (or otherwise make it harder to be supported later on)

Thanks,
Vesa Jääskeläinen




^ permalink raw reply	[flat|nested] 9+ messages in thread
* Warnings in kern/dl.c
@ 2008-07-18  5:38 Pavel Roskin
  2008-07-18  6:18 ` Bean
  0 siblings, 1 reply; 9+ messages in thread
From: Pavel Roskin @ 2008-07-18  5:38 UTC (permalink / raw)
  To: Bean, The development of GRUB 2

Hello, Bean!

I think this change from the x86_64 EFI patch should be reverted:

         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
          GRUB_TARGET_SIZEOF_VOID_P.

It causes warnings when compiling grub-emu on x64_64 for i386:

kern/dl.c: In function 'grub_dl_resolve_symbols':
kern/dl.c:357: warning: cast from pointer to integer of different size
kern/dl.c:368: warning: cast from pointer to integer of different size
kern/dl.c:370: warning: cast to pointer from integer of different size
kern/dl.c:376: warning: cast from pointer to integer of different size
kern/dl.c:378: warning: cast to pointer from integer of different size
kern/dl.c:382: warning: cast to pointer from integer of different size
kern/dl.c:384: warning: cast to pointer from integer of different size
kern/dl.c:389: warning: cast from pointer to integer of different size

I'm really close to eliminating all warnings, and such additions are  
not making me happy.

The warnings could be suppressed somehow, but I don't think it's the  
right thing to do.  64-bit grub-emu cannot load 32-bit modules (and  
vice versa).  64-bit grub-emu could load 64-bit modules in principle,  
although we don't compile them.   We could compile special grub-emu  
modules, but I would not spend any serious effort on it.

Anyway, I would prefer that we compile support for loading 64-bit  
modules and possibly catch some useful warnings relevant to 64-bit  
platforms (even if our target is 32-bit).  It's better than to  
"implement" cross-architecture loading of modules that would not work  
anyway by filling the code with casts.  It's better than to tolerate  
several warnings.  Either increases the risk that a real warning would  
be missed.

-- 
Regards,
Pavel Roskin



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-07-18 16:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 14:14 Warnings in kern/dl.c chaac
2008-07-18 15:20 ` Pavel Roskin
2008-07-18 15:35   ` Bean
2008-07-18 16:12     ` Pavel Roskin
  -- strict thread matches above, loose matches on Subject: below --
2008-07-18  5:38 Pavel Roskin
2008-07-18  6:18 ` Bean
2008-07-18  6:22   ` Bean
2008-07-18  9:36     ` Bean
2008-07-18 13:21       ` Bean

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.