SO vs DSO

Marc Glisse marc.glisse@inria.fr
Fri Oct 22 20:05:00 GMT 2010


On Fri, 22 Oct 2010, Jeffrey Walton wrote:

> Recently I was asked if a object supported dynamic loading. I believe
> the underlying question is "shared object" versus "dynamic shared
> object". The best I can tell, I getting back lots of useless
> information during a search.
>
> (1) How does on tell a SO and DSO apart?

They are often the same. At first glance, on unix-like systems, 
libthing.so.1 is meant for regular linking while file.so is for dlopening, 
but you are free.

> (2) How does one stop an adversary from using them incorrectly?

I don't think you want to think of it as an adversary. Just proper 
documentation.

> I was thinking a flag might be present, similar to RFC3514 - The
> Security Flag in the IPv4 Header. That is, there's a gentleman's
> agreement if a particular bit is set, the attacker will not misuse the
> object.

GNU ld provides -z nodlopen, which I assume sets some kind of flag. You 
may want to read the documentation of your linker since you seem to be 
interested...

-- 
Marc Glisse



More information about the Gcc-help mailing list