Make GCC initialize global variable using instructions instead of assembly directive such as .long or .quad

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

 



Given the following code example:

    void myfunc (void) {}
    void *myglobal = myfunc;
    void main (void) {
            return;
    }

Is there a way to make GCC initialize global variable using
instructions instead of assembly directive such as .long or .quad ?
Such that in the above example the address of myfunc that is used to
initialize myglobal get computed at run-time instead of at compile
time.



[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