Just read about the today issue with parity multisig wallets,
https://paritytech.io/blog/security-alert.html
where as far I can understand the problem is that a library linked to many wallets was hacked, transformed to a contract and finally suicided causing all the wallets to freeze forever. However, this comes with some surprise for me as I assumed that like in traditional languages, linking a library to a contract was a compile time process where once the compilation is done you'd expect a bytecode containing contracts and libraries to be deployed to some address. Instead, in the docs I read that libraries have their own ethereum address. The library hacked today seems in fact to live at some address in the blockchain and then linked to many contracts. This puzzles me a bit, then when I use SafeMath.sol in my code what is my contract linking to? A bytecode I've just compiled or some instance already deployed?
Can anyone explain how the linking mechanism works?