cancel
Showing results for 
Search instead for 
Did you mean: 

Use of __libc_init_array call

oldone
Associate II
Posted on April 07, 2018 at 18:36

Hello,

Into the startup assembly file there is a call to the __libc_init_array procedure, and i would like to know :

  • What does it do ?
  • If it is really essential ?
  • What is the default implementation of the _init() procedure which is called by it ?

Thanks.

#startup #c #libc_init_array
2 REPLIES 2
Posted on April 08, 2018 at 01:06

Typically C++ constructors, ie initialize globally defined classes.

If you have such things it would be critical to initialize them properly if you expect your code to function correctly.

You could presumably use the disassembly listing to see what the code does, and if it is working it's way through an initialization array.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 08, 2018 at 02:30

So, if i only use C language i don't have to call this function ? Thanks