[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix for linker build ID in Fedora 8

From: Lubomir Kundrak
Subject: Re: [PATCH] Fix for linker build ID in Fedora 8
Date: Sun, 25 Nov 2007 23:26:04 +0100


Thanks for the patch!

On Fri, 2007-11-23 at 22:07 -0500, Pavel Roskin wrote:
> Hello!
> Here's an alternate patch for the issue that appeared on Fedora 8.  The
> linker adds a "build ID" ( by default.  That section
> makes objcopy create output files about 128M long when asked to use
> binary format.  Needless to say, they are not suitable as grub images.

I'd say this is a binutils bug, it wrecks the usability of binary output
format of objcopy. It doesn't make much sense to me, that it needs to be
mapped to the process' address space, but maybe gdb needs it that way, I
really have no clue -- I'm tempted to ask the binutils developers.

> ---
> +++
> @@ -229,6 +229,16 @@
>  fi
> +AC_MSG_CHECKING([whether linker accepts `--build-id=none'])
> +LDFLAGS="$LDFLAGS -Wl,--build-id=none"
> +AC_TRY_LINK(, , build_id_flag=yes, build_id_flag=no)
> +AC_MSG_RESULT([$build_id_flag])
> +if test "x$build_id_flag" = xyes; then
> +  TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,--build-id=none"
> +fi
> +
>  #
>  # Compiler features.
>  #

I disagree with a solution like this -- you completely disable
generation of build-ids. They are highly usable and I want them to be
included in our debuginfo package. They're basically okay in *.exec
files, so why not just leave them out of *.img-s, which don't contain
any debugging information anyways.

I attach the patch I use. The first hunk is basically the same as yours,
the second one is self-explanatory.

Lubomir Kundrak (Red Hat Security Response Team)

Attachment: grub-1.95-buildid.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]