Module: Mesa Branch: main Commit: 735df516e9ccbaea57f34942388e164ad04e6b02 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=735df516e9ccbaea57f34942388e164ad04e6b02
Author: Eric Engestrom <[email protected]> Date: Fri Feb 24 10:57:24 2023 +0000 radv: split linker script for android since it requires different symbols Fixes: 4956f6d0bf477568731f ("radv: Add Android module info to linker script.") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8338 Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Acked-by: David Heidelberg <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21518> --- src/amd/vulkan/meson.build | 9 +++++++-- src/amd/vulkan/vulkan-android.sym | 16 ++++++++++++++++ src/amd/vulkan/vulkan.sym | 5 ----- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/amd/vulkan/meson.build b/src/amd/vulkan/meson.build index ea449a5150b..d0ee8233c07 100644 --- a/src/amd/vulkan/meson.build +++ b/src/amd/vulkan/meson.build @@ -170,8 +170,13 @@ libvulkan_radeon_ld_args = [] libvulkan_radeon_link_depends = [] if with_ld_version_script - libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan.sym')] - libvulkan_radeon_link_depends += files('vulkan.sym') + if with_platform_android + libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan-android.sym')] + libvulkan_radeon_link_depends += files('vulkan-android.sym') + else + libvulkan_radeon_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'vulkan.sym')] + libvulkan_radeon_link_depends += files('vulkan.sym') + endif endif radv_build_id = get_option('radv-build-id') diff --git a/src/amd/vulkan/vulkan-android.sym b/src/amd/vulkan/vulkan-android.sym new file mode 100644 index 00000000000..2ca40faa09e --- /dev/null +++ b/src/amd/vulkan/vulkan-android.sym @@ -0,0 +1,16 @@ +{ + global: + vk_icdGetInstanceProcAddr; + vk_icdGetPhysicalDeviceProcAddr; + vk_icdNegotiateLoaderICDInterfaceVersion; + + # Andoid looks for this global in HAL modules. In the source it occurs + # as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an + # instance of struct hwvulkan_module_t. + HMI; + + local: + # When static linking LLVM, all its symbols are public API. + # That may cause symbol collision, so explicitly demote everything. + *; +}; diff --git a/src/amd/vulkan/vulkan.sym b/src/amd/vulkan/vulkan.sym index 2ca40faa09e..c85a22e905a 100644 --- a/src/amd/vulkan/vulkan.sym +++ b/src/amd/vulkan/vulkan.sym @@ -4,11 +4,6 @@ vk_icdGetPhysicalDeviceProcAddr; vk_icdNegotiateLoaderICDInterfaceVersion; - # Andoid looks for this global in HAL modules. In the source it occurs - # as HAL_MODULE_INFO_SYM (which is just a #define for HMI) and it's an - # instance of struct hwvulkan_module_t. - HMI; - local: # When static linking LLVM, all its symbols are public API. # That may cause symbol collision, so explicitly demote everything.
