What are practical applications of weak linking?

One use of weak linking is implementing the replaceable functions in the C++ standard. Namely: void *operator new(std::size_t); void *operator new(std::size_t, std::nothrow_t const &) noexcept; void *operator new[](std::size_t); void *operator new[](std::size_t, const std::nothrow_t&) noexcept; void operator delete(void *) noexcept; void operator delete(void *, std::nothrow_t const &) noexcept; void operator delete[](void *) noexcept; void operator delete[](void … Read more

Link with an older version of libstdc++

You don’t need to link to a different library, you need to use an older version of the compiler. Have a look at the GNU ABI policy. The libstdc++ shared library is designed to be forward compatible. I.e. version 6.0.10 can be used if you need 6.0.8. In the policy you can read that from … Read more

.bss vs COMMON: what goes where?

// file a.c // file-scope int a = 0; // goes into BSS after compilation of a.c into object file a.o, a symbol goes into BSS section. // file b.c // file-scope int b; // goes into COMMON section after compilation of b.c into object file b.o, b symbol goes into COMMON section. After linking … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)