[opensuse] su - shared objcet or executable?
![](https://seccdn.libravatar.org/avatar/cdd3074d5d0db0f82c94bbcd5b1183d8.jpg?s=120&d=mm&r=g)
On my openSUSE 10.2 `file /bin/su` reports the following: /bin/su: setuid ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, stripped and the same for some other files which are expected to be simple executables, that is, "LSB executable", like '/usr/bin/perl': /usr/bin/perl: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped Is it a bug or a specific feature? `readelf -h /bin/su` agrees with `file` reporting su to be a shared object... -- Regards, Denis. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b12cfb65ca4faebc3e3aac17838e8f8d.jpg?s=120&d=mm&r=g)
On Wednesday 23 May 2007 08:55, Denis Silakov wrote:
On my openSUSE 10.2 `file /bin/su` reports the following:
/bin/su: setuid ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, stripped
and the same for some other files which are expected to be simple executables, that is, "LSB executable", like '/usr/bin/perl':
/usr/bin/perl: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.4, dynamically linked (uses shared libs), for GNU/Linux 2.6.4, stripped
Is it a bug or a specific feature? `readelf -h /bin/su` agrees with `file` reporting su to be a shared object...
What kind of bug do you suspect? Is anything malfunctioning? Almost all Linux executables have at least one dynamically linked library, the one that allows system calls to be made. Most are fully dynamically linked. Exceptions most often those designed to run on a wide variety of Linux installations and not distributed as part of or for a specific distribution. Examples include the Adobe-distributed Reader, the Mozilla Foundation-distributed Firefox, etc. Dynamic linking is used because both file size and run-time RAM requirements are significantly reduced by using dynamic linking. On my system (a 32-bit SuSE Linux 10.0 installation), there are only 25 completely statically linked binaries among those found in /bin, /usr/bin, /sbin and /usr/sbin. That is out of 2921 total binary executable.
-- Regards, Denis.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/cdd3074d5d0db0f82c94bbcd5b1183d8.jpg?s=120&d=mm&r=g)
Randall R Schulz wrote:
What kind of bug do you suspect? Is anything malfunctioning?
Almost all Linux executables have at least one dynamically linked library, the one that allows system calls to be made. Most are fully dynamically linked.
Well, I see. Surely, there is no malfunctioning here. The thing is that we are collecting information about different distributions for the Linux Standard Base - https://www.linux-foundation.org/dbadmin/browse/distr.php and in the LSB there are 'Libraries' (system-wide shared libraries) and there are 'Commands' (for example, different utilities). All distribution data is collected automatically, but I don't see at the moment how to distinguish LSB commands from LSB libraries. The idea was to use `file` output, but very often it reports 'shared object' for files which we'd like to add as commands... -- Regards, Denis. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/b12cfb65ca4faebc3e3aac17838e8f8d.jpg?s=120&d=mm&r=g)
On Wednesday 23 May 2007 09:24, Denis Silakov wrote:
Randall R Schulz wrote:
What kind of bug do you suspect? Is anything malfunctioning?
Almost all Linux executables have at least one dynamically linked library, the one that allows system calls to be made. Most are fully dynamically linked.
Well, I see. Surely, there is no malfunctioning here.
The thing is that we are collecting information about different distributions for the Linux Standard Base -
https://www.linux-foundation.org/dbadmin/browse/distr.php
and in the LSB there are 'Libraries' (system-wide shared libraries) and there are 'Commands' (for example, different utilities). All distribution data is collected automatically, but I don't see at the moment how to distinguish LSB commands from LSB libraries. The idea was to use `file` output, but very often it reports 'shared object' for files which we'd like to add as commands...
Well, in nearly (entirely?) all cases, a file that's really meant to be used as the target of dynamic linking as a shared library will be named with the suffix ".so" followed optionally by some version suffixes of the form (as an extended regular expression, enclosing quotation marks excluded) "(\.[0-9]+)+". I believe kernel module share the same file format, but are named with a .ko suffix. I should state that my information on these topics might be a bit dated, so you might want to verify it, but it's at least approximately accurate.
-- Regards, Denis.
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/3908000813c096a4198a910e0262108d.jpg?s=120&d=mm&r=g)
On Wednesday 23 May 2007 11:24, Denis Silakov wrote:
The thing is that we are collecting information about different distributions for the Linux Standard Base -
https://www.linux-foundation.org/dbadmin/browse/distr.php
and in the LSB there are 'Libraries' (system-wide shared libraries) and there are 'Commands' (for example, different utilities). All distribution data is collected automatically, but I don't see at the moment how to distinguish LSB commands from LSB libraries. The idea was to use `file` output, but very often it reports 'shared object' for files which we'd like to add as commands... hi Denis, you might want to take a look at:
/usr/share/misc/magic This file details all of the "types" magic numbers... there is a difference between a shared object and a shared library.... the file might be of some help to you. -- Kind regards, M Harris <>< -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
Denis Silakov
-
M Harris
-
Randall R Schulz