Index: aclocal.m4 =================================================================== --- aclocal.m4 (revision 1933) +++ aclocal.m4 (working copy) @@ -113,6 +113,7 @@ if test "x$grub_cv_prog_ld_build_id_none" = xyes; then MODULE_LDFLAGS="$MODULE_LDFLAGS -Wl,--build-id=none" + PPC_BUILD_ID_FLAG="-Wl,--build-id=none" fi ]) Index: conf/powerpc-ieee1275.rmk =================================================================== --- conf/powerpc-ieee1275.rmk (revision 1933) +++ conf/powerpc-ieee1275.rmk (working copy) @@ -87,7 +87,7 @@ kernel_elf_CFLAGS = $(COMMON_CFLAGS) kernel_elf_ASFLAGS = $(COMMON_ASFLAGS) kernel_elf_LDFLAGS = $(COMMON_LDFLAGS) -static-libgcc -lgcc \ - -Wl,-N,-S,-Ttext,0x200000,-Bstatic + -Wl,-N,-S,-Ttext,0x200000,-Bstatic $(PPC_BUILD_ID_FLAG) # Scripts. sbin_SCRIPTS = grub-install Index: configure.ac =================================================================== --- configure.ac (revision 1933) +++ configure.ac (working copy) @@ -330,6 +330,7 @@ AC_SUBST(TARGET_CPPFLAGS) AC_SUBST(TARGET_LDFLAGS) AC_SUBST(MODULE_LDFLAGS) +AC_SUBST(PPC_BUILD_ID_FLAG) # Set them to their new values for the tests below. CC="$TARGET_CC" Index: Makefile.in =================================================================== --- Makefile.in (revision 1933) +++ Makefile.in (working copy) @@ -73,6 +73,7 @@ TARGET_IMG_LDFLAGS = @TARGET_IMG_LDFLAGS@ TARGET_OBJ2ELF = @TARGET_OBJ2ELF@ MODULE_LDFLAGS = @MODULE_LDFLAGS@ +PPC_BUILD_ID_FLAG = @PPC_BUILD_ID_FLAG@ EXEEXT = @EXEEXT@ OBJCOPY = @OBJCOPY@ STRIP = @STRIP@ Index: ChangeLog =================================================================== --- ChangeLog (revision 1933) +++ ChangeLog (working copy) @@ -1,3 +1,14 @@ +2008-12-01 Manoel R. Abranches
+ + Add option --build-id=none to ld when linking kernel.elf in powerpc + to prevent creating additional LOAD segments. + Patch made with help from Paulo R. Pinatti . + * aclocal.m4: add --build-id=none to new variable when acceptable by + ld. + * conf/powerpc-ieee1275.rmk: New variable. + * configure.ac: New variable. + * Makefile.in: New variable. + 2008-11-29 Robert Millan * disk/ata.c (grub_ata_pciinit): Handle errors rised by