Mir

Merge lp:~alan-griffiths/mir/remove-RTLD_GLOBAL-hack into lp:mir

Proposed by Alan Griffiths
Status: Merged
Approved by: Andreas Pokorny
Approved revision: no longer in the source branch.
Merged at revision: 3100
Proposed branch: lp:~alan-griffiths/mir/remove-RTLD_GLOBAL-hack
Merge into: lp:mir
Diff against target: 37 lines (+0/-14)
1 file modified
src/platforms/mesa/server/kms/platform_symbols.cpp (+0/-14)
To merge this branch: bzr merge lp:~alan-griffiths/mir/remove-RTLD_GLOBAL-hack
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andreas Pokorny (community) Approve
Cemil Azizoglu (community) Approve
Review via email: mp+277277@code.launchpad.net

Commit message

mesa-kms: remove RTLD_GLOBAL hack from server platform

Description of the change

mesa-kms: remove RTLD_GLOBAL hack from server platform

The hack is also applied by the client mesa platform. So this is redundant.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

ok

review: Approve
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

agreed

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/platforms/mesa/server/kms/platform_symbols.cpp'
2--- src/platforms/mesa/server/kms/platform_symbols.cpp 2015-11-09 15:58:52 +0000
3+++ src/platforms/mesa/server/kms/platform_symbols.cpp 2015-11-11 17:49:42 +0000
4@@ -26,7 +26,6 @@
5
6 #include <fcntl.h>
7 #include <sys/ioctl.h>
8-#include <dlfcn.h>
9
10 namespace mg = mir::graphics;
11 namespace mgm = mg::mesa;
12@@ -97,17 +96,6 @@
13 return ::setsid();
14 }
15 };
16-
17-// Hack around the way mesa loads mir: This hack makes the
18-// necessary symbols global.
19-void ensure_loaded_with_rtld_global()
20-{
21- Dl_info info;
22-
23- dladdr(reinterpret_cast<void*>(&ensure_loaded_with_rtld_global), &info);
24- dlopen(info.dli_fname, RTLD_NOW | RTLD_NOLOAD | RTLD_GLOBAL);
25-}
26-
27 }
28
29 mir::UniqueModulePtr<mg::Platform> create_host_platform(
30@@ -210,7 +198,5 @@
31 std::shared_ptr<mg::DisplayReport> const&,
32 std::shared_ptr<mg::NestedContext> const& nested_context)
33 {
34- // ensure mesa finds the mesa mir-platform symbols
35- ensure_loaded_with_rtld_global();
36 return mir::make_module_ptr<mgm::GuestPlatform>(nested_context);
37 }

Subscribers

People subscribed via source and target branches