[PATCH] Remove zero terminator for .eh_frame in libc.so [BZ #22053]

Alan Modra amodra@gmail.com
Fri Sep 1 01:01:00 GMT 2017


On Thu, Aug 31, 2017 at 06:53:08AM -0700, H.J. Lu wrote:
> elf/sofini.c has a zero terminator for .eh_frame in libc.so.  It was
> added before -eh-frame-hdr is added to ld.  Since -eh-frame-hdr is
> always used to build libc.so, zero terminator in elf/sofini.c can be
> removed.

This might be true, but the real problem is that elf/sofini.os appears
on the libc.so link command line before -lgcc.

> Tested on x86-64.  OK for master?
> 
> H.J.
> ---
> 	[BZ #22053]
> 	* elf/sofini.c (__FRAME_END__): Removed.
> ---
>  elf/sofini.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/elf/sofini.c b/elf/sofini.c
> index 13e74b7903..7ec313be4e 100644
> --- a/elf/sofini.c
> +++ b/elf/sofini.c
> @@ -9,11 +9,3 @@ static void (*const __DTOR_END__[1]) (void)
>       __attribute__ ((used, section (".dtors")))
>       = { 0 };
>  #endif
> -
> -/* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
> -   this would be the 'length' field in a real FDE.  */
> -
> -typedef unsigned int ui32 __attribute__ ((mode (SI)));
> -static const ui32 __FRAME_END__[1]
> -  __attribute__ ((used, section (".eh_frame")))
> -  = { 0 };
> -- 
> 2.13.5
> 

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Libc-alpha mailing list