Hi made a patch to add --build-id=none to TARGET_LDFLAGS instead of
MODULE_LDFLAGS. with this it is passed to ld when linking kernel.elf.

without this kernel.elf creates a additional LOAD segment with a virtual
address in PhysAddr witch causes problem with OF and causes
grub-mkelfimage to not work correctly.

On Tue, 2008-12-02 at 13:34 -0500, Pavel Roskin wrote:
> On Tue, 2008-12-02 at 19:14 +0200, Vesa Jääskeläinen wrote:
> 
> > No no. I mean just KERNEL_LDFLAGS like comparison to MODULE_LDFLAGS. No
> > elf or nothing like that. Is there any problem if one provides this
> > setting even on x86 if linker recognizes it? (what is being tested
> > here). PPC_BUILD_ID_FLAG just sounds too specific.
> > 
> > Isn't EFI also using ELF? I assume this would be beneficial also there.
> 
> I agree, we should not be be multiplying hacks.  There is already code
> adding -Wl,--build-id=none to TARGET_LDFLAGS.  It's a macro
> grub_PROG_LD_BUILD_ID_NONE in aclocal.m4.  What's wrong with it?  Does
> it fail to add -Wl,--build-id=none on PowerPC or is TARGET_LDFLAGS not
> used to link kernel.elf?
> 
> What are the symptoms caused by not using -Wl,--build-id=none?
> 
-- 
Best Regards,

Manoel Abranches <[EMAIL PROTECTED]>
IBM Linux Technology Center Brazil
Index: aclocal.m4
===================================================================
--- aclocal.m4	(revision 1933)
+++ aclocal.m4	(working copy)
@@ -112,7 +112,7 @@
 AC_MSG_RESULT([$grub_cv_prog_ld_build_id_none])
 
 if test "x$grub_cv_prog_ld_build_id_none" = xyes; then
-  MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none"
+  TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
 fi
 ])
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 1933)
+++ ChangeLog	(working copy)
@@ -1,3 +1,10 @@
+2008-12-04  Manoel R. Abranches <[EMAIL PROTECTED]>
+		
+	Add --build-id=none to all ld calls instead of only the ones related
+	to modules. This correct a problem with grub-mkelfimage.
+	* aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
+	TARGET_LDFLAGS
+
 2008-11-29  Robert Millan  <[EMAIL PROTECTED]>
 
 	* disk/ata.c (grub_ata_pciinit): Handle errors rised by
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to