Top | ![]() |
![]() |
![]() |
![]() |
const char * | srt_library_get_requested_name () |
const char * | srt_library_get_absolute_path () |
const char * | srt_library_get_soname () |
const char * | srt_library_get_messages () |
const char * | srt_library_get_multiarch_tuple () |
SrtLibraryIssues | srt_library_get_issues () |
const char * const * | srt_library_get_missing_symbols () |
const char * const * | srt_library_get_misversioned_symbols () |
const char * const * | srt_library_get_missing_versions () |
const char * const * | srt_library_get_dependencies () |
const char * | srt_library_get_real_soname () |
SrtLibraryIssues | srt_check_library_presence () |
int | srt_library_get_exit_status () |
int | srt_library_get_terminating_signal () |
gchar * | absolute-path | Read / Write / Construct Only |
GStrv | dependencies | Read / Write / Construct Only |
gint | exit-status | Read / Write / Construct Only |
SrtLibraryIssues | issues | Read / Write / Construct Only |
gchar * | messages | Read / Write / Construct Only |
GStrv | missing-symbols | Read / Write / Construct Only |
GStrv | missing-versions | Read / Write / Construct Only |
GStrv | misversioned-symbols | Read / Write / Construct Only |
gchar * | multiarch-tuple | Read / Write / Construct Only |
gchar * | real-soname | Read / Write / Construct Only |
gchar * | requested-name | Read / Write / Construct Only |
gchar * | soname | Read / Write / Construct Only |
gint | terminating-signal | Read / Write / Construct Only |
#define | SRT_LIBRARY_ISSUES_INTERNAL_ERROR |
enum | SrtLibraryIssues |
enum | SrtLibrarySymbolsFormat |
GEnum ╰── SrtLibrarySymbolsFormat GFlags ╰── SrtLibraryIssues GObject ╰── SrtLibrary
SrtLibrary is an opaque object representing a shared library.
This is a reference-counted object: use g_object_ref()
and
g_object_unref()
to manage its lifecycle.
const char *
srt_library_get_requested_name (SrtLibrary *self
);
Return the name that was requested to be loaded when checking self
.
const char *
srt_library_get_absolute_path (SrtLibrary *self
);
Return the absolute path of self
.
const char *
srt_library_get_soname (SrtLibrary *self
);
srt_library_get_soname
is deprecated and should not be used in newly-written code.
Deprecated alias for srt_library_get_requested_name()
.
See also srt_library_get_real_soname()
, which might be what you
thought this did.
const char *
srt_library_get_messages (SrtLibrary *self
);
Return the diagnostic messages produced while checking this library, if any.
A string, which must
not be freed, or NULL
if there were no diagnostic messages.
[nullable][transfer none][type utf8]
const char *
srt_library_get_multiarch_tuple (SrtLibrary *self
);
Return the multiarch tuple representing the ABI of self
.
SrtLibraryIssues
srt_library_get_issues (SrtLibrary *self
);
Return the problems found when loading self
.
const char * const *
srt_library_get_missing_symbols (SrtLibrary *self
);
Return the symbols that were expected to be provided by self
but
were not found.
The symbols
that were missing from self
, as a NULL
-terminated array. The
pointer remains valid until self
is destroyed.
[array zero-terminated=1][element-type filename]
const char * const *
srt_library_get_misversioned_symbols (SrtLibrary *self
);
Return the symbols that were expected to be provided by self but were
available with a different version. Note that this list contains the symbol
we expected, not the symbol we found. For example, if we expected to find
the versioned symbol curl_getenv@CURL_OPENSSL_3
in libcurl.so.4
(as
seen in Ubuntu 12.04 and the Steam Runtime), but we actually found either
curl_getenv@CURL_OPENSSL_4
(as seen in Debian 10) or an unversioned
curl_getenv, then this list would contain curl_getenv@CURL_OPENSSL_3
The symbols
were available with a different version from self
, as a NULL
-terminated
array. The pointer remains valid until self
is destroyed.
[array zero-terminated=1][element-type filename]
const char * const *
srt_library_get_missing_versions (SrtLibrary *self
);
Return the version definitions that were expected to be provided by self
but were not found. This array is non-empty if and only if the
SRT_LIBRARY_ISSUES_MISSING_VERSIONS
issue flag is set.
The versions
that were missing from self
, as a NULL
-terminated array. The
pointer remains valid until self
is destroyed.
[array zero-terminated=1][element-type filename]
const char * const *
srt_library_get_dependencies (SrtLibrary *self
);
Return the dependencies of self
.
The dependencies
of self
, as a NULL
-terminated array. The pointer remains valid
until self
is destroyed.
[array zero-terminated=1][element-type utf8]
const char *
srt_library_get_real_soname (SrtLibrary *self
);
Return the ELF DT_SONAME
found by parsing the loaded library.
This is often the same as srt_library_get_requested_name()
,
but can differ when compatibility aliases are involved.
A string like libz.so.1
,
which is valid as long as self
is not destroyed, or NULL
if the SONAME could not be determined.
[type filename][transfer none]
SrtLibraryIssues srt_check_library_presence (const char *requested_name
,const char *multiarch
,const char *symbols_path
,SrtLibrarySymbolsFormat symbols_format
,SrtLibrary **more_details_out
);
Attempt to load requested_name
into a helper subprocess, and check whether
it conforms to the ABI provided in symbols_path
.
If symbols_format
is SRT_LIBRARY_SYMBOLS_FORMAT_PLAIN
, symbols_path
must
list one symbol per line, in the format jpeg_input_complete@LIBJPEG_6.2
for versioned symbols or DGifOpen@Base
(or just DGifOpen
) for symbols
not associated with a version.
If symbols_format
is SRT_LIBRARY_SYMBOLS_FORMAT_DEB_SYMBOLS
, symbols_path
must be in deb-symbols(5) format. It may list symbols for more SONAMEs than
just requested_name
; if so, they are ignored.
requested_name |
The |
[type filename] |
multiarch |
A multiarch tuple like |
|
symbols_path |
The filename of a file listing
symbols, or |
[nullable][type filename] |
symbols_format |
The format of |
|
more_details_out |
Used to return an
SrtLibrary object representing the shared library provided
by |
[out][optional][transfer full] |
int
srt_library_get_exit_status (SrtLibrary *self
);
Return the exit status of helpers when testing the given library.
int
srt_library_get_terminating_signal (SrtLibrary *self
);
Return the terminating signal used to terminate the helper if any.
#define SRT_LIBRARY_ISSUES_INTERNAL_ERROR SRT_LIBRARY_ISSUES_UNKNOWN
A bitfield with flags representing problems with a library, or
SRT_LIBRARY_ISSUES_NONE
(which is numerically zero) if no problems
were detected.
In general, more bits set means more problems.
The library could not be loaded |
||
Some of the expected symbols were not present |
||
Some of the expected symbols were available with a different version |
||
A generic internal error occurred, or an unknown issue flag was encountered while reading a report |
||
No directory containing expected ABIs has been set, so we cannot know which libraries we are meant to have found |
||
Helper timed out when executing |
||
Some of the expected version definitions were not present |
||
The library was expected to have
at least one version definition, but has no version definitions
at all. Implies |
||
There are no problems |
“absolute-path”
property“absolute-path” gchar *
The absolute path of this library, for example /usr/lib/libz.so.1.
Flags: Read / Write / Construct Only
Default value: NULL
“dependencies”
property“dependencies” GStrv
Dependencies of this library.
Flags: Read / Write / Construct Only
“exit-status”
property“exit-status” gint
Exit status of helper(s) executed. 0 on success, positive on unsuccessful exit(), -1 if killed by a signal or not run at all.
Flags: Read / Write / Construct Only
Allowed values: >= -1
Default value: 0
“issues”
property“issues” SrtLibraryIssues
Problems with this library.
Flags: Read / Write / Construct Only
“messages”
property“messages” gchar *
Diagnostic messages produced while checking this library.
Flags: Read / Write / Construct Only
Default value: NULL
“missing-symbols”
property“missing-symbols” GStrv
Symbols that were expected to be in this library, but were found to be missing.
Flags: Read / Write / Construct Only
“missing-versions”
property“missing-versions” GStrv
Versions that were expected to be in this library, but were found to be missing.
Flags: Read / Write / Construct Only
“misversioned-symbols”
property“misversioned-symbols” GStrv
Symbols that were expected to be in this library, but were available with a different version.
Flags: Read / Write / Construct Only
“multiarch-tuple”
property“multiarch-tuple” gchar *
Debian-style multiarch tuple representing the ABI of this library, usually i386-linux-gnu or x86_64-linux-gnu.
Flags: Read / Write / Construct Only
Default value: NULL
“real-soname”
property“real-soname” gchar *
ELF DT_SONAME found when loading the library.
Flags: Read / Write / Construct Only
Default value: NULL
“requested-name”
property“requested-name” gchar *
The name that was loaded, for example libz.so.1.
Flags: Read / Write / Construct Only
Default value: NULL
“soname”
property“soname” gchar *
Deprecated alias for requested-name.
Flags: Read / Write / Construct Only
Default value: NULL
“terminating-signal”
property“terminating-signal” gint
Signal used to terminate helper process if any, 0 otherwise.
Flags: Read / Write / Construct Only
Allowed values: >= 0
Default value: 0