[Mesa-dev] [PATCH 1/2] an: step one toward correct symbol exports
Emil Velikov
emil.l.velikov at gmail.com
Thu Apr 21 12:14:59 UTC 2016
Annotate the only symbol that should be provided statically as PUBLIC
and add VISIBILITY_CFLAGS to hide everything else.
Note: with this in place we still have multiple symbols exported. Those
will be fixed with follow up commits.
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Does anyone know the section name that covers this? Afaict one could
(should?) have a layer section in their json file with a functions
vkGetInstanceProcAddr... entry point. Right ?
-Emil
src/intel/vulkan/Makefile.am | 5 ++++-
src/intel/vulkan/anv_device.c | 5 ++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index edbe213..bac5993 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -66,7 +66,10 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src/compiler/nir \
-I$(top_builddir)/src/intel
-libvulkan_intel_la_CFLAGS = $(CFLAGS) -DVK_USE_PLATFORM_XCB_KHR -Wno-override-init -msse2
+libvulkan_intel_la_CFLAGS = \
+ $(VISIBILITY_CFLAGS) \
+ $(CFLAGS) \
+ -DVK_USE_PLATFORM_XCB_KHR -Wno-override-init -msse2
VULKAN_SOURCES = \
anv_allocator.c \
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 00edd95..d6e74d3 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -641,13 +641,12 @@ PFN_vkVoidFunction anv_GetInstanceProcAddr(
return anv_lookup_entrypoint(pName);
}
-/* The loader wants us to expose a second GetInstanceProcAddr function
- * to work around certain LD_PRELOAD issues seen in apps.
- */
+PUBLIC
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(
VkInstance instance,
const char* pName);
+PUBLIC
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL vk_icdGetInstanceProcAddr(
VkInstance instance,
const char* pName)
--
2.8.0
More information about the mesa-dev
mailing list