libs/libc/dllfcn: Implement dlerror using strerror.
This commit is contained in:
parent
b7f958a02e
commit
9e2238f6cd
@ -39,7 +39,9 @@
|
|||||||
|
|
||||||
#include <nuttx/config.h>
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <dllfcn.h>
|
#include <dllfcn.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@ -68,6 +70,5 @@
|
|||||||
|
|
||||||
FAR char *dlerror(void)
|
FAR char *dlerror(void)
|
||||||
{
|
{
|
||||||
#warning Missing logic
|
return (FAR char *)strerror(errno);
|
||||||
return NULL;
|
|
||||||
}
|
}
|
@ -101,12 +101,12 @@ static inline FAR const void *dlgetsym(FAR void *handle,
|
|||||||
modp->modinfo.nexports);
|
modp->modinfo.nexports);
|
||||||
if (symbol == NULL)
|
if (symbol == NULL)
|
||||||
{
|
{
|
||||||
serr("ERROR: Failed to find symbol in symbol \"$s\" in table\n", name);
|
serr("ERROR: Failed to find symbol in symbol \"%s\" in table\n", name);
|
||||||
err = ENOENT;
|
err = ENOENT;
|
||||||
goto errout_with_lock;
|
goto errout_with_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the address within the module assoicated with the symbol */
|
/* Return the address within the module associated with the symbol */
|
||||||
|
|
||||||
modlib_registry_unlock();
|
modlib_registry_unlock();
|
||||||
DEBUGASSERT(symbol->sym_value != NULL);
|
DEBUGASSERT(symbol->sym_value != NULL);
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
*
|
*
|
||||||
* Description:
|
* Description:
|
||||||
* dlsymtab() is a non-standard shared library interface. It selects the
|
* dlsymtab() is a non-standard shared library interface. It selects the
|
||||||
* symbol table to use when binding a shared libary to the base firmware
|
* symbol table to use when binding a shared library to the base firmware
|
||||||
* which may be in FLASH memory.
|
* which may be in FLASH memory.
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
|
@ -118,7 +118,7 @@ FAR const void *modsym(FAR void *handle, FAR const char *name)
|
|||||||
goto errout_with_lock;
|
goto errout_with_lock;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the address within the module assoicated with the symbol */
|
/* Return the address within the module associated with the symbol */
|
||||||
|
|
||||||
modlib_registry_unlock();
|
modlib_registry_unlock();
|
||||||
DEBUGASSERT(symbol->sym_value != NULL);
|
DEBUGASSERT(symbol->sym_value != NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user