2007-10-18 19:55:19

by Roland McGrath

[permalink] [raw]
Subject: [PATCH] ia64: check-segrel.lds vs --build-id

Some versions of ld with --build-id support will crash when using the flag
with a linker script that discards notes. This bites ia64's check-segrel.lds.
The bug is easy to avoid.

Signed-off-by: Roland McGrath <[email protected]>

--- a/arch/ia64/scripts/check-segrel.lds
+++ b/arch/ia64/scripts/check-segrel.lds
@@ -1,6 +1,7 @@
SECTIONS {
. = SIZEOF_HEADERS;
.rodata : { *(.rodata) } :ro
+ .note : { *(.note*) }
. = 0xa0000;
.data : { *(.data) } :dat
/DISCARD/ : { *(*) }


2007-10-19 10:34:16

by Denys Vlasenko

[permalink] [raw]
Subject: Re: [PATCH] ia64: check-segrel.lds vs --build-id

On Thursday 18 October 2007 20:54, Roland McGrath wrote:
> Some versions of ld with --build-id support will crash when using the flag
> with a linker script that discards notes. This bites ia64's check-segrel.lds.
> The bug is easy to avoid.

It's fixed in newer ld (not released yet IIRC), but why
are we shooting ourself in the foot by adding --build-id,
and then suffering from --build-id related problems?
--
vda

2007-10-25 16:10:59

by Doug Chapman

[permalink] [raw]
Subject: Re: [PATCH] ia64: check-segrel.lds vs --build-id

On Thu, 2007-10-18 at 12:54 -0700, Roland McGrath wrote:
> Some versions of ld with --build-id support will crash when using the flag
> with a linker script that discards notes. This bites ia64's check-segrel.lds.
> The bug is easy to avoid.
>
> Signed-off-by: Roland McGrath <[email protected]>
>
> --- a/arch/ia64/scripts/check-segrel.lds
> +++ b/arch/ia64/scripts/check-segrel.lds
> @@ -1,6 +1,7 @@
> SECTIONS {
> . = SIZEOF_HEADERS;
> .rodata : { *(.rodata) } :ro
> + .note : { *(.note*) }
> . = 0xa0000;
> .data : { *(.data) } :dat
> /DISCARD/ : { *(*) }
>
> -

This patch is not yet in the git tree. This, along with the patch to
gate.lds.S that Roland submitted are both blocking our bringup of Fedora
on ia64.

thanks,

- Doug