[syslinux] [PATCH] com32: Include .init_array section in .ctors in linker script

Matt Fleming matt at console-pimps.org
Thu Nov 1 03:12:51 PDT 2012


On Thu, 2012-11-01 at 10:01 +0000, Matt Fleming wrote:
> From: Matt Fleming <matt.fleming at intel.com>
> 
> GCC 4.7 now places pointers to functions with the 'constructor' and
> 'destructor' function attributes in .init_array and .fini_array
> sections, respectively, whereas previously they were in the .ctors and
> .dtors sections. This change breaks the ctors/dtors code as it only
> expects function to be in the .ctors and .dtors sections, meaning the
> ctors and dtors functions are never executed.
> 
> While a COM32_INIT() macro exists that places functions in the
> .init_array section, no function makes use of it, so there should be
> no fallout from this change.
> 
> Signed-off-by: Matt Fleming <matt.fleming at intel.com>
> ---
>  com32/lib/elf32.ld | 15 ++++-----------
>  com32/lib/init.h   | 15 ---------------
>  com32/lib/malloc.c |  1 -
>  3 files changed, 4 insertions(+), 27 deletions(-)
>  delete mode 100644 com32/lib/init.h

In my haste I forgot to mention that this is for the 5.00 (elflink)
branch.

-- 
Matt Fleming, Intel Open Source Technology Center




More information about the Syslinux mailing list