[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] dynamic libs



W dniu 10.10.2011 20:17, Peter Slegg pisze:

A few weeks I was trying to build Netsurf and really didn't have
the time to commit to trying to get all it's required libs to
build. They have to be built specifically for Netsurf at the moment.

It was frustrating because I have built rpms for some of the libs
but couldn't get the Netsurf ones to build.

I know that a full shared lib systems is difficult to achieve as
it has been discussed a few times over the years.

Previously I suggested non-shared, linked libs, were an application
loads the libs it needs for itself only. This would be like static
libs and once the app has loaded would be the same but has it has
several benefits:

  1 easier to update apps when a lib is updated
  2 easier to port apps
  3 faster building of apps

I don't know if gcc is capable of supporting dynamic libs that are
not shared.

I just wondered what the current thoughts are.

Fromm Gcc viewpoint, it does not matter if dynamic lib is shared or not. If it is not shared - every application loads its own copy. If it is shared - (usually) every process lives in its own address space, so it sees its 'own' copy, and all changes to it are done locally anyway.

It is also possible to have shared libs with common address space for all processes, but extra care must be taken when writing such libs (it must be reentrant).

AdamK