[PATCH] D41041: [ELF] Don't set the executable bit for relocatable or shared files

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 09:36:56 PST 2017


On Mon, Dec 11, 2017 at 9:29 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Rui Ueyama <ruiu at google.com> writes:
>
> > On Sun, Dec 10, 2017 at 11:04 AM, Rafael Avila de Espindola <
> > rafael.espindola at gmail.com> wrote:
> >
> >> Both bfd and gold mark .so executable actually.
> >>
> >
> > Do you know why they do that?
>
> I would guess because shared libraries can have entry points. The musl
> libc is also the dynamic linker for example.
>

Um, true. ld-linux.so.2 is executable as well. In most cases DSOs are not
executables, so making them executable by default doesn't make much sense
to me, but I don't feel so strongly about it to make a change to the
traditional default behavior. I'm fine keeping DSOs executable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171211/10d02989/attachment.html>


More information about the llvm-commits mailing list