What is .init_array and how does it affext an arm-eabi build for bare metal?

Cary Coutant ccoutant@google.com
Fri Jan 23 19:14:00 GMT 2009


> .init_array contains pointers to blocks of code that need to be executed
> when an application is being initialized (before main() is called).  Its
> used for a number of things, but the primary use is in C++ for running
> static constructors; a secondary use that is sometimes used is to
> initialize IO systems in the C library.

For more information, see the gABI documentation here:

  http://www.sco.com/developers/gabi/latest/contents.html

Look in Chapter 4 under "Special Sections", and in Chapter 5 under
"Initialization and Termination Functions".

This is just a newer alternative to the .init section.

-cary



More information about the Binutils mailing list