About hacking libc

Carlos O'Donell carlos@systemhalted.org
Wed Apr 24 13:15:00 GMT 2013


On Wed, Apr 24, 2013 at 8:52 AM, Xinyang Ge <xxg113@cse.psu.edu> wrote:
> Thanks for your detailed elaboration. Is init() called when open.so is
> first loaded?

Please follow list etiquette and avoid top posting.

The function is marked "constructor" so it will run before main starts.

See: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html

Using an attribute is an easy way to get portable behaviour from the
same compiler.

Cheers,
Carlos.



More information about the Libc-help mailing list