diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-11-07 23:29:42 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2015-11-07 23:29:42 -0500 |
commit | 25cc9644b2d8dae449e5a75559a202acb21b49bd (patch) | |
tree | d05c309afc31d884b8e0e55fed691ca65d54b8d9 /src/dl/dlsym_reserved.go | |
parent | aa17f05b81357cb3c63bee30b361c682ab12205e (diff) |
use the separate packages from lukeshu.com, clean up the Makefile
Diffstat (limited to 'src/dl/dlsym_reserved.go')
-rw-r--r-- | src/dl/dlsym_reserved.go | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/src/dl/dlsym_reserved.go b/src/dl/dlsym_reserved.go deleted file mode 100644 index 081e012..0000000 --- a/src/dl/dlsym_reserved.go +++ /dev/null @@ -1,63 +0,0 @@ -// The documentation for RTLD_DEFAULT and RTLD_NEXT is taken from the -// Linux Programmer's Manual page for dlsym(3). -// -// Copyright 1995 Yggdrasil Computing, Incorporated. -// Copyright 2003, 2015 Michael Kerrisk <mtk.manpages@gmail.com>. -// Copyright 2015 Luke Shumaker <lukeshu@sbcglobal.net>. -// -// This is free documentation; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of -// the License, or (at your option) any later version. -// -// The GNU General Public License's references to "object code" -// and "executables" are to be interpreted as the output of any -// document formatting or typesetting system, including -// intermediate and printed output. -// -// This manual is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public -// License along with this manual; if not, see -// <http://www.gnu.org/licenses/>. - -package dl - -import "unsafe" - -//#define _GNU_SOURCE -//#include <stdint.h> -//#include <dlfcn.h> -//const uintptr_t rtld_next = (uintptr_t)RTLD_NEXT; -//const uintptr_t rtld_default = (uintptr_t)RTLD_DEFAULT; -import "C" - -// These constant values for Handles are reserved by POSIX for future -// use with these meanings. They are available in GNU libdl if -// _GNU_SOURCE is defined. -var ( - // This Handle represents the default default shared object - // search order. The search will include global symbols in - // the executable and its dependencies, as well as symbols in - // shared objects that were dynamically loaded with the - // RTLD_GLOBAL flag. - RTLD_DEFAULT Handle - - // This Handle represents the shared object search order after - // the current object. This allows one to provide a wrapper - // around a function in another shared object, so that, for - // example, the definition of a function in a preloaded shared - // object (see LD_PRELOAD in ld.so(8)) can find and invoke the - // "real" function provided in another shared object (or for - // that matter, the "next" definition of the function in cases - // where there are multiple layers of preloading). - RTLD_NEXT Handle -) - -func init() { - RTLD_DEFAULT = Handle{c: unsafe.Pointer(uintptr(C.rtld_default)), o: 2} - RTLD_DEFAULT = Handle{c: unsafe.Pointer(uintptr(C.rtld_next)), o: 2} -} |