Subject: Re: shared objects installed without execute permission bogus warning?
To: Todd Vierling <tv@duh.org>
From: grant beattie <grant@NetBSD.org>
List: tech-pkg
Date: 10/27/2004 19:36:49
--Vsi50HYs5tPfr+1I
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 25, 2004 at 09:57:05AM -0400, Todd Vierling wrote:

> > what is the purpose of this? these shared objects will only ever be
> > dlopen()'d, and my understanding is that dlopen() doesn't care if the
> > .so lacks the execute bit.
>=20
> Not true on some platforms.  Interix is notable and will *break* if a shl=
ib
> is installed without +x.
>=20
> Classically, *all* shared objects, dlopen()ed or not, required execute
> permission, because that permission was used to govern whether mmap()ed
> pages could be marked executable.  This warning is therefore quite correc=
t.

Solaris ships with (some) non-executable shared libraries, and
this change breaks x11-links where /usr/openwin is read-only (eg.
chroot) because it tries to chmod symlinks:

=3D=3D=3D> [Automatic none shared object handling]
/usr/pkg/share/x11-links/lib/libXol.so: installed without execute permissio=
n; fixing (should use [BSD_]INSTALL_LIB)
chmod: WARNING: can't change /usr/pkg/share/x11-links/lib/libXol.so
*** Error code 1

I don't know if test -h is supported on IRIX5, and it's easier to just
not do it unless needed. it also causes deviation from the default
behaviour on some platforms which I think should be avoided (your
recent libtool sanity fixes are a definite plus here!).

should I add _OPSYS_SHLIB_EXEC to platform/*.mk ?

grant.


--Vsi50HYs5tPfr+1I
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD8DBQFBf2wxluYOb9yiFXoRArVuAKCaeNWRJm7LELVIQY8zZ1eX68dingCgs2DZ
I8s8jWfRaXEbjAllaenLKcI=
=kf8T
-----END PGP SIGNATURE-----

--Vsi50HYs5tPfr+1I--