hendrikw | b1ac52f | 2015-10-01 18:29:34 -0700 | [diff] [blame] | 1 | |
2 | /* | ||||
3 | * Copyright 2015 Google Inc. | ||||
4 | * | ||||
5 | * Use of this source code is governed by a BSD-style license that can be | ||||
6 | * found in the LICENSE file. | ||||
7 | */ | ||||
8 | #include "SkOSLibrary.h" | ||||
9 | |||||
10 | #include <dlfcn.h> | ||||
11 | |||||
12 | void* DynamicLoadLibrary(const char* libraryName) { | ||||
13 | return dlopen(libraryName, RTLD_LAZY); | ||||
14 | } | ||||
15 | |||||
16 | void* GetProcedureAddress(void* library, const char* functionName) { | ||||
17 | return dlsym(library, functionName); | ||||
18 | } |