3 ms·
A quite fun, related feature of the AIX linker, is that it will automatically make any function name prefixed with "__sinit_" statically invoked the same as thi
by apaprocki 9y ago
A quite fun, related feature of the AIX linker, is that it will automatically make any function name prefixed with "__sinit_" statically invoked the same as this attribute does. So you name the function a certain way to take care of AIX/xlc, add pragmas to take care of other UNIX vendor compilers add the attribute for any GCC-based (or compatible) compiler, and they are actually pretty cross-platform! Not... that... I would use these all the time or anything like that :)
- pjmlp 9y agoThe fun was even better in the old days, where each UNIX had a different concept of what a shared object should be. AIX used to implement shared objects just like on Windows, using an export definitions file and import libraries, for example.
- apaprocki 9y agoStill does to this day. And it has a machine-wide cache of libraries, so simply updating the library and restarting the processes isn't enough to get the new version -- you have to be aware it could be in the cache and might need to be manually flushed by someone with elevated access. shudder
- pjmlp 9y agoThanks for the clarification. Last time I used it was about 2003.