Re: Make GCC initialize global variables generating instructions in crti.S _init

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

 



On Sun, Jan 05, 2020 at 11:57:26PM -0500, William Tambe wrote:
> Is there a way to make GCC generate instructions within the crti.S
> _init function to initialize a global variable, instead of generating
> .long or .quad assembly statement ?
> The idea being to make GCC generate instructions to initialize a
> global variable, just like it generates instructions to initialize a
> local variable.

Have a look at attribute((constructor))?


Segher



[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