Skip to content

Commit

Permalink
add missing symbols for fc26, u16.04, u17.04
Browse files Browse the repository at this point in the history
I don't know why Ubuntu 17.04 introduces so many missing symbols to DCE
than others distributions.  But it contains to pass all tests of DCE.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Jan 12, 2018
1 parent e29a47a commit 267f216
Show file tree
Hide file tree
Showing 9 changed files with 214 additions and 9 deletions.
1 change: 1 addition & 0 deletions model/dce-dl.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

void *dce_dlopen(const char *filename, int flag);
void *dce_dlsym(void *handle, const char *symbol);
int dce_dlclose(void *handle);
5 changes: 5 additions & 0 deletions model/dce-poll.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ int dce_poll (struct pollfd *fds, nfds_t nfds, int timeout)
return count;
}

int dce___poll_chk (struct pollfd *fds, nfds_t nfds, int timeout, size_t fdslen)
{
return dce_poll(fds, nfds, timeout);
}

int dce_select (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
struct timeval *timeout)
{
Expand Down
1 change: 1 addition & 0 deletions model/dce-poll.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extern "C" {
#endif

int dce_poll (struct pollfd *fds, nfds_t nfds, int timeout);
int dce___poll_chk (struct pollfd *fds, nfds_t nfds, int timeout, size_t fdslen);

#ifdef __cplusplus
}
Expand Down
8 changes: 8 additions & 0 deletions model/dce-string.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ char * dce___strcpy_chk (char *__restrict __dest,
return strcpy (__dest, __src);
}

void *dce___memcpy_chk (void *__restrict __dest,
const void *__restrict __src, size_t __len,
size_t __destlen)
{
/// \todo Do actual checking
return memcpy (__dest, __src, __len);
}

char * dce_strpbrk (const char *s, const char *a)
{
return (char*) strpbrk (s, a);
Expand Down
3 changes: 3 additions & 0 deletions model/dce-string.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ char * dce___strcpy_chk (char *__restrict __dest,
size_t __destlen);
char * dce_strpbrk (const char *s, const char *accept);
char * dce_strstr (const char *h, const char *n);
void *dce___memcpy_chk (void *__restrict __dest,
const void *__restrict __src, size_t __len,
size_t __destlen);

#ifdef __cplusplus
}
Expand Down
12 changes: 12 additions & 0 deletions model/libc-dce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@
#include <assert.h>
#include <dlfcn.h>
#include <link.h>
#include <execinfo.h>
#include <sched.h>
#include <sys/mount.h>
#include <sys/inotify.h>
#include <regex.h>
#include <iconv.h>
#include <glob.h>
#include <malloc.h>

extern void __cxa_finalize (void *d);
extern int __cxa_atexit (void (*func)(void *), void *arg, void *d);
Expand All @@ -118,6 +126,10 @@ extern int __xpg_strerror_r (int __errnum, char *__buf, size_t __buflen);
extern char * __strcpy_chk (char *__restrict __dest,
const char *__restrict __src,
size_t __destlen);
extern void *__memcpy_chk (void *__restrict __dest,
const void *__restrict __src, size_t __len,
size_t __destlen) __THROW;

// from glibc's stdio.h
extern int __sprintf_chk (char *, int, size_t, const char *, ...) __THROW;
extern int __snprintf_chk (char *, size_t, int, size_t, const char *, ...)
Expand Down
Loading

0 comments on commit 267f216

Please sign in to comment.