building a .so that is also an executable
Update 2: see Andrew G Morgan’s slightly more complicated solution which does work for any GLIBC (that solution is also used in libc.so.6 itself (since forever), which is why you can run it as ./libc.so.6 (it prints version info when invoked that way)). Update 1: this no longer works with newer GLIBC versions: ./a.out: error … Read more