com32: Include .init_array section in .ctors in linker script
authorMatt Fleming <matt.fleming@intel.com>
Thu, 1 Nov 2012 09:50:46 +0000 (09:50 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Fri, 2 Nov 2012 14:06:20 +0000 (14:06 +0000)
commite55d4988880a538fa81fe6bb2bf4fd5604174f06
tree152cf191dc78eaffaf6a45db8dc5fb00b3300843
parent7cb503fd746b80c8613a3e76dde93aedb6e75830
com32: Include .init_array section in .ctors in linker script

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@intel.com>
com32/lib/elf32.ld
com32/lib/init.h [deleted file]
com32/lib/malloc.c