Re: Function with __attribute__ ((constructor)) not placed in .ctors section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



msciboor <msciboor@xxxxxxxxxxxxxx> writes:

> I read through Internet that .ctors section is used to hold pointers
> to functions with __attribute__ ((constructor)). However when I
> compile my program with function with __attribute__ ((constructor)),
> then .ctors section is empty and this function is invoked directly
> from __libc_csu_init function instead of __do_global_ctors_aux. Was it
> changed lately?

Debian gcc-4.6 4.6.3-8 does place the pointer in .ctors, but ld
of binutils 2.22-6.1 then moves it to .init_array.  Perhaps the
same happens in your test with 4.6.3-1ubuntu5.  Mentioned in
<http://sources.redhat.com/bugzilla/show_bug.cgi?id=12910>.

Debian gcc-4.7 4.7.1-2 places the pointer directly in .init_array.
Implemented in <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770>.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux