I am building a shared library on linux using gcc. I get no compile or link errors but my shared object always has the execution bit set (though readelf indicates its a shared object). I am just doing this:
> echo "int f() {return 1;}" > a.cpp
> gcc -c a.cpp
> gcc -shared -o liba.so a.o
> ls -l liba.so
-rwxr-xr-x 1 me me 6652 2011-06-09 17:05 liba.so
Why would a shared object have the execute bit set?