projects
/
litex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36e03ec
)
libdyld: handle existing but undefined symbols during lookup.
author
whitequark
<whitequark@whitequark.org>
Sun, 2 Aug 2015 02:49:15 +0000
(
05:49
+0300)
committer
whitequark
<whitequark@whitequark.org>
Sun, 2 Aug 2015 02:56:11 +0000
(
05:56
+0300)
software/libdyld/dyld.c
patch
|
blob
|
history
diff --git
a/software/libdyld/dyld.c
b/software/libdyld/dyld.c
index 112f2e04effd737a9fc8b9eb2181e4dc724dcbf5..da531b6d1ac21ee7e63840fe3561aefc44da1963 100644
(file)
--- a/
software/libdyld/dyld.c
+++ b/
software/libdyld/dyld.c
@@
-171,5
+171,9
@@
void *dyld_lookup(const char *symbol, struct dyld_info *info) {
index = info->hash.chain[index];
}
- return (void*)(info->base + info->symtab[index].st_value);
+ Elf32_Addr value = info->symtab[index].st_value;
+ if(value != 0)
+ return (void*)(info->base + value);
+ else
+ return NULL;
}