Maxime Villard writes: > Le 07/08/2015 11:38, Christos Zoulas a écrit : > > In article <21928.1438883...@splode.eterna.com.au>, > > matthew green <m...@eterna.com.au> wrote: > >> > >> ya - this might actually break some linux binary packages, where > >> there is a well-defined interface to executing a library. > >> > >> i think this part should be reverted. > > In fact, I remember that at the time I wrote this patch - more than a > year ago -, I had read in the ELF spec that libraries normally don't > have an entry point, but that some do only to display a copyright notice, > for "convenience", just in case someone ./ them. > > That would be consistent with the example Christos has given. > > For what other purpose would a library have an entry point?
linux ld.so has an entry point, for instance. IIRC, it's related to how their ldd(1) works. the 'for "convenience"' has been known to be used in installation scripts. it's not just for copyrights, though that is often part of the info displayed. christos already mentioned PIE executables. there are plenty of existing uses of this, and i'm sure someone will find other ways to use this. > Theoretically, a library that has an entry point is not a library. an interesting stance i can't quite agree with. .mrg.