gnome-shell/src
Simon McVittie a0f8774a70 Get uninstalled libraries from environment in preference to ELF headers
Introspecting the dynamic headers is low-level and full of implementation
details.

It seems that gnome-shell was assuming the address of the string table is
given by taking the DT_STRTAB dynamic symbol table's value (d_un.d_val)
and casting it to an absolute pointer. However, in some environments
(apparently including Debian mips64el) the DT_STRTAB dynamic symbol
table's d_un.d_val can be merely an offset relative to the base address
of the executable in memory. The base address would have to be parsed from
a different ELF header, which as far as I know is not part of _DYNAMIC.

Rather than trying to look up the Shell executable's base address using
dlinfo() or similar, during unit testing it seems easier to pass in the
uninstalled library search path in the environment, along with other
uninstalled paths that we are going to need anyway.

The reason given for not using GI_TYPELIB_PATH in commit 9bc89b82
"main: Prepend RPATH or RUNPATH paths to gir search paths" was that
g_irepository_prepend_library_path() takes precedence, but we can easily
define our own environment variable that takes even higher precedence.
If it's set, we might as well also bypass the PKGLIBDIR, since while
running uninstalled we *only* want to use the uninstalled libraries.

When not running unit tests, it's desirable to make
`./build/src/gnome-shell` something you can run directly, so continue
to parse the ELF headers - but only on x86_64, where we're reasonably
confident that it works and any regressions with a newer glibc will
be noticed promptly.

Resolves: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6877
Bug-Debian: https://bugs.debian.org/1042980
Signed-off-by: Simon McVittie <smcv@debian.org>
2023-08-04 20:17:43 +00:00
..
calendar-server dateMenu: Use desktop action to open Evolution calendar 2023-02-12 20:14:02 +00:00
hotplug-sniffer hotplug-sniffer: Drop "volatile" from g_once_init_enter() sentinels 2021-03-22 11:12:23 +00:00
st st/icon-theme: Remove special-casing of symbolic lookup 2023-07-13 15:15:56 +00:00
tray na-xembed: Do not use same coordinates of mutter offscreen windows 2023-03-19 12:19:45 +00:00
data-to-c.pl build: Fix the path of perl for data-to-c.pl 2015-05-22 19:03:44 +08:00
gnome-shell-extension-prefs Add small gnome-shell-extension-prefs script 2020-04-28 00:06:19 +02:00
gnome-shell-extension-tool.in shell-extension-tool: Fix typo 2019-08-27 12:16:27 +03:00
gnome-shell-plugin.c init: Move Meta main loop into JavaScript after GJS context is initialized 2023-06-07 19:23:27 +00:00
gnome-shell-portal-helper.c portalHelper: Port to ESM 2023-06-21 13:26:42 +02:00
gnome-shell-test-tool.in test-tool: Require script argument 2023-07-07 19:43:28 +02:00
gtkactionmuxer.c Stop using GSlice 2020-10-19 20:18:11 +02:00
gtkactionmuxer.h Also update gtkaction* 2014-01-09 14:59:31 -05:00
gtkactionobservable.c Update copy/paste code from upstream 2013-05-13 18:34:26 -04:00
gtkactionobservable.h Update copy/paste code from upstream 2013-05-13 18:34:26 -04:00
gtkactionobserver.c Also update gtkaction* 2014-01-09 14:59:31 -05:00
gtkactionobserver.h Also update gtkaction* 2014-01-09 14:59:31 -05:00
main.c Get uninstalled libraries from environment in preference to ELF headers 2023-08-04 20:17:43 +00:00
meson.build shell: Add device monitor for cameras 2023-07-29 13:55:15 +03:00
org.gtk.Application.xml Generate GDBus proxy object for org.gtk.Application 2014-11-27 10:59:55 +00:00
run-js-test.c tests: Load unit tests as modules 2023-07-15 02:35:56 +00:00
shell-action-modes.h *: Fix spelling mistakes found by codespell 2020-08-21 18:25:09 +00:00
shell-app-cache-private.h app-cache: add ShellAppCache for GAppInfo caching 2020-03-11 18:06:15 -07:00
shell-app-cache.c shell: Make singletons owned by ShellGlobal 2023-04-20 14:49:38 +02:00
shell-app-private.h shell: Use MetaStartupNotification 2018-11-23 13:58:35 +01:00
shell-app-system-private.h apps: Ensure running apps override new .desktop file data 2011-09-05 17:29:41 -04:00
shell-app-system.c shell-app-system: Give priority to .desktop IDs that should be shown 2023-04-20 15:11:58 +00:00
shell-app-system.h shell-app-system: Cache GAppInfos around 2019-01-26 22:55:31 +01:00
shell-app-usage.c shell: Make singletons owned by ShellGlobal 2023-04-20 14:49:38 +02:00
shell-app-usage.h app-usage: Remove crufty old "context"s idea 2018-11-17 12:08:33 +00:00
shell-app.c shell/app: Also make recent when raising other windows 2023-02-23 20:45:31 +01:00
shell-app.h shell/app: Add new get_icon() method 2020-07-01 12:42:57 +02:00
shell-blur-effect.c shell: Specify G_PARAM_EXPLICIT_NOTIFY where appropriate 2022-02-10 13:09:37 +00:00
shell-blur-effect.h blur-effect: Use sigma value instead of blur radius 2020-02-12 11:10:38 -03:00
shell-camera-monitor.c shell/camera-monitor: Tweak indicator disable timeout 2023-07-30 11:24:35 +00:00
shell-camera-monitor.h shell: Add device monitor for cameras 2023-07-29 13:55:15 +03:00
shell-global-private.h shell: Make singletons owned by ShellGlobal 2023-04-20 14:49:38 +02:00
shell-global.c main: Pass script on CLI instead of via environment 2023-07-07 19:43:28 +02:00
shell-global.h shell: Make singletons owned by ShellGlobal 2023-04-20 14:49:38 +02:00
shell-glsl-effect.c glsl-effect: Don't overwrite the framebuffer's alpha/X channel 2023-04-26 13:42:34 +00:00
shell-glsl-effect.h shell: Drop unnecessary gtk header includes 2023-03-03 20:38:03 +00:00
shell-invert-lightness-effect.c Always assume GLSL is supported 2021-09-21 16:37:01 +02:00
shell-invert-lightness-effect.h shell: Define COGL_ENABLE_EXPERIMENTAL_API and related defines globally 2014-08-07 14:49:54 -04:00
shell-keyring-prompt.c build: Port to gcr4 2022-08-02 16:13:54 +00:00
shell-keyring-prompt.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-mount-operation.c *: Fix spelling mistakes found by codespell 2020-08-21 18:25:09 +00:00
shell-mount-operation.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-network-agent.c shell/network-agent: Add method to add VPN secrets to agent response 2020-12-25 11:43:13 +01:00
shell-network-agent.h shell/network-agent: Add method to add VPN secrets to agent response 2020-12-25 11:43:13 +01:00
shell-perf-helper.c shell/perf-helper: Port to GTK4 2023-06-07 11:12:40 +00:00
shell-perf-log.c src/shell: Plug some small leaks 2021-08-13 15:16:54 +02:00
shell-perf-log.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-polkit-authentication-agent.c src: Stop using g_get_current_time() 2019-08-09 19:22:18 +00:00
shell-polkit-authentication-agent.h build: Do not redefine polkit autocleanup 2022-05-17 14:04:01 +00:00
shell-screenshot.c shell: Avoid use of gdk_pixbuf_get_from_surface() 2023-03-03 20:38:03 +00:00
shell-screenshot.h screenshot-ui: Use ImageContent for notification icon 2022-01-27 22:25:42 +00:00
shell-secure-text-buffer.c build: Port to gcr4 2022-08-02 16:13:54 +00:00
shell-secure-text-buffer.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-square-bin.c iconGrid: Subclass a C actor for BaseIcon 2021-03-13 22:13:25 +00:00
shell-square-bin.h iconGrid: Subclass a C actor for BaseIcon 2021-03-13 22:13:25 +00:00
shell-stack.c Remove ClutterAllocationFlags 2020-05-20 15:12:03 +02:00
shell-stack.h shell: Drop unnecessary gtk header includes 2023-03-03 20:38:03 +00:00
shell-tray-icon-private.h shell: Move tray implementation away from GtkSocket 2023-03-03 13:34:44 +00:00
shell-tray-icon.c shell: Move tray icon event emulation to NaTrayChild 2023-03-03 13:34:44 +00:00
shell-tray-icon.h shell: Move tray implementation away from GtkSocket 2023-03-03 13:34:44 +00:00
shell-tray-manager.c shell: Move tray implementation away from GtkSocket 2023-03-03 13:34:44 +00:00
shell-tray-manager.h shell/tray-manager: Allow to unmanage screen 2020-03-06 18:45:21 +00:00
shell-util.c shell/util: Use gtk4 for week-start fallback 2023-07-03 19:32:13 +02:00
shell-util.h shell: Add call to check the existence of a systemd unit 2022-02-11 23:51:24 +00:00
shell-window-preview-layout.c shell: Use swapped signal connection for MetaWindowActor::destroy 2023-05-03 14:00:33 +00:00
shell-window-preview-layout.h Move WindowPreviewLayout from JS to C 2021-03-09 15:40:49 +00:00
shell-window-preview.c shell: Specify G_PARAM_EXPLICIT_NOTIFY where appropriate 2022-02-10 13:09:37 +00:00
shell-window-preview.h windowPreview: Subclass a C actor 2021-03-09 15:40:49 +00:00
shell-window-tracker-private.h apps: Ensure running apps override new .desktop file data 2011-09-05 17:29:41 -04:00
shell-window-tracker.c shell: Make singletons owned by ShellGlobal 2023-04-20 14:49:38 +02:00
shell-window-tracker.h shell: Hide/drop unused public API 2018-11-23 13:58:35 +01:00
shell-wm-private.h ui: Add InhibitShortcutsDialog 2017-08-02 11:27:42 +01:00
shell-wm.c ui: Add InhibitShortcutsDialog 2017-08-02 11:27:42 +01:00
shell-wm.h shell: Use G_DECLARE_*_TYPE macros 2015-10-15 22:58:28 +02:00
shell-workspace-background.c workspace: Port WorkspaceBackground allocate to C 2022-08-03 12:30:31 +00:00
shell-workspace-background.h workspace: Port WorkspaceBackground allocate to C 2022-08-03 12:30:31 +00:00