Re: Are *.la files supposed to be executable?

2021-01-09 Thread Tim Rice


Hi Jeff,

On Sat, 9 Jan 2021, Jeffrey Walton wrote:

> Hi Everyone,
> 
> I'm auditing $prefix for ownership and permissions. I noticed *.la
> files are executable:
> 
> $ ls -Al /usr/local/lib/libgettextlib.la
> -rwxr-xr-x 1 root root 1078 Jan  8 15:58 /usr/local/lib/libgettextlib.la
[snip]
> Are the *.la files supposed to be executable?

Since libtool sources the .la files, they do not need to be executable.
You will see a mix of executable and non-executable in various distos.
My packaging scripts do a chmod 644 on them.
 
> Jeff
> 

-- 
Tim RiceMultitalents
t...@multitalents.net





Are *.la files supposed to be executable?

2021-01-09 Thread Jeffrey Walton
Hi Everyone,

I'm auditing $prefix for ownership and permissions. I noticed *.la
files are executable:

$ ls -Al /usr/local/lib/libgettextlib.la
-rwxr-xr-x 1 root root 1078 Jan  8 15:58 /usr/local/lib/libgettextlib.la

And:

$ file -bi /usr/local/lib/libgettextlib.la
text/plain; charset=us-ascii

And:

$ cat /usr/local/lib/libgettextlib.la
# libgettextlib.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6
#
# Please DO NOT delete this file!
# It is necessary for linking the library.

# The name that we can dlopen(3).
dlname='libgettextlib-0.21.so'

# Names of this library.
library_names='libgettextlib-0.21.so libgettextlib-0.21.so libgettextlib.so'
...

I don't believe the runtime linker maps these files as executable. If
they did, it would be something simple like a linker script:

$ cat /usr/local/lib/libcurses.so
INPUT(-lncursesw)

Are the *.la files supposed to be executable?

Jeff