Forum > Unix
compiled linux library (.so) is executable
Чебурашка:
Hello,
in debian (maybe someone might want to check in other linuxes) why when compiling either under lazaruz, or lazbuild, or even doing fpc -s + ppas.sh, if the object to be produced is a .so, it results 755? Normally libraries are 644 (at least in debian). Ok there are some that can be directly executed, maybe is it for this reason?
marcov:
It's the linker that creates the file ?
Maybe it is the dlltool that does the installing of the library that sets the permissions ?
Чебурашка:
--- Quote from: marcov on May 11, 2023, 04:18:30 pm ---It's the linker that creates the file ?
Maybe it is the dlltool that does the installing of the library that sets the permissions ?
--- End quote ---
I found that "gcc -c" makes the output file non executable, so it is possible to have the final result not executable (despite default is yes).
I will try on a alpine linux to see how fpc+lazarus do.
I suspect it's a config of the deb.
I will tell after.
Fred vS:
Hello.
Maybe it is a executable compiled with 'hardening' and became a "executable library":
https://wiki.freepascal.org/hardening
MarkMLl:
Looking at Debian 12 ("Bookworm") because of something in another thread, I note
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ----rw-r--r-- 1 root root 283 Apr 10 09:35 libc.so-rwxr-xr-x 1 root root 1922136 Apr 10 09:35 libc.so.6
where libc.so is actually a linker script.
So I don't know what's really going on, but I think we need to be prepared for some traditional unix weirdness.
MarkMLl
Navigation
[0] Message Index
[#] Next page