Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
347efded
Commit
347efded
authored
Mar 11, 2006
by
Mathieu Malaterre
Browse files
ENH: Also look into data segment (consistant with other implementation)
parent
6f3ef5aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Source/kwsys/DynamicLoader.cxx
View file @
347efded
...
...
@@ -80,7 +80,11 @@ DynamicLoader::GetSymbolAddress(LibHandle lib, const char* sym)
void
*
addr
;
int
status
;
status
=
shl_findsym
(
&
lib
,
sym
,
TYPE_PROCEDURE
,
&
addr
);
/* TYPE_PROCEDURE Look for a function or procedure.
* TYPE_DATA Look for a symbol in the data segment (for example, variables).
* TYPE_UNDEFINED Look for any symbol.
*/
status
=
shl_findsym
(
&
lib
,
sym
,
TYPE_UNDEFINED
,
&
addr
);
void
*
result
=
(
status
<
0
)
?
(
void
*
)
0
:
addr
;
// Hack to cast pointer-to-data to pointer-to-function.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment