Skip to content

Commit

Permalink
Move C.RTLD_DEEPBIND do linux-specific file
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <elezar@nvidia.com>
  • Loading branch information
elezar committed Sep 19, 2023
1 parent 550ae98 commit 1b16d5b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkg/dl/dl.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const (
RTLD_LOCAL = C.RTLD_LOCAL
RTLD_NODELETE = C.RTLD_NODELETE
RTLD_NOLOAD = C.RTLD_NOLOAD
RTLD_DEEPBIND = C.RTLD_DEEPBIND
)

type DynamicLibrary struct {
Expand Down
26 changes: 26 additions & 0 deletions pkg/dl/dl_linux.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
# Copyright (c) NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
**/

package dl

// #cgo LDFLAGS: -ldl
// #include <dlfcn.h>
// #include <stdlib.h>
import "C"

const (
RTLD_DEEPBIND = C.RTLD_DEEPBIND
)

0 comments on commit 1b16d5b

Please sign in to comment.