Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
ASM = compat__opendir230 . S compat__alphasort30 . S compat__ctime50 . S \
compat__ctime_r50 . S compat__ctime_rz50 . S compat__dbm_delete13 . S \
compat__dbm_fetch13 . S compat__dbm_firstkey13 . S \
compat__dbm_nextkey13 . S compat__dbm_store13 . S compat__difftime50 . S \
compat__fts_children60 . S compat__fts_close60 . S compat__fts_open60 . S \
compat__fts_read60 . S compat__fts_set60 . S compat__getdents30 . S \
compat__getitimer50 . S compat__getlastlogx50 . S compat__getpwent50 . S \
compat__getpwent_r50 . S compat__getpwnam50 . S compat__getpwnam_r50 . S \
compat__getpwuid50 . S compat__getpwuid_r50 . S compat__getutent50 . S \
compat__getutmp50 . S compat__getutmpx50 . S compat__getutxent50 . S \
compat__getutxid50 . S compat__getutxline50 . S compat__glob30 . S \
compat__globfree30 . S compat__gmtime50 . S compat__gmtime_r50 . S \
compat__localtime50 . S compat__localtime_r50 . S compat__localtime_rz50 . S \
compat__longjmp14 . S compat__mknod50 . S compat__mktime50 . S \
compat__mktime_z50 . S compat__nanosleep50 . S compat__offtime50 . S \
compat__offtime_r50 . S compat__opendir30 . S compat__posix2time50 . S \
compat__posix2time_z50 . S compat__pututxline50 . S \
compat__pwcache_userdb50 . S compat__readdir30 . S compat__readdir_r30 . S \
compat___readdir_unlocked50 . S compat__scandir30 . S compat__select50 . S \
compat__setitimer50 . S compat__setjmp14 . S compat__setlocale50 . S \
compat__settimeofday50 . S compat__shmctl50 . S compat__sigaction14 . S \
compat__sigaddset14 . S compat__sigdelset14 . S compat__sigemptyset14 . S \
compat__sigfillset14 . S compat__sigismember14 . S compat__siglongjmp14 . S \
compat__sigpending14 . S compat__sigprocmask14 . S compat__sigsetjmp14 . S \
compat__sigsuspend14 . S compat__time50 . S compat__time2posix50 . S \
2011-11-29 12:39:22 +01:00
compat__stat50 . S compat__fstat50 . S compat__lstat50 . S \
Fine grained compatibility with _RENAMEd symbols
The NetBSD libc provides a mechanism to have versions of system calls.
By 'renaming' symbols to a new version, freshly compiled programs will
automatically use the new symbol iff they use the proper header files. The
old, not renamed, version of the symbol will still exist (after being moved
to the compat directory), so old programs can still link.
Since MINIX doesn't support dynamic linking, the whole rename mechanism
doesn't really work for us. However, removing it would create a huge diff
with the current NetBSD libc.
A lot of the compat code relies on things we don't (seem to) have, and
therefore does not get built and linked. This causes trouble for tools like
autoconf, which will fail to find the renamed symbols. For example,
currently select gets renamed to __select50 in libc. Autoconf looks for
'select' and doesn't find it and reports we don't have it. This is where
the compat.S stub comes into play: it generates the old symbols and jumps to
the new symbols. However, as this is done in one object file, all renamed
symbols get linked together, causing binaries to be huge. This patch fixes
that by generating an object file for each renamed symbol.
This patch also makes the MISSING_SYSCALLS more complete and marginally
reduces the diff with NetBSD.
2011-11-28 11:12:44 +01:00
compat__time2posix_z50 . S compat__timegm50 . S compat__timelocal50 . S \
compat__timelocal_z50 . S compat__timeoff50 . S compat__tzalloc50 . S \
compat__tzfree50 . S compat__tzgetname50 . S compat__tzset50 . S \
compat__tzsetwall50 . S compat__unsetenv13 . S compat__unvis13 . S \
compat__updlastlogx50 . S compat__updwtmpx50 . S compat__utime50 . S \
compat__vfork14 . S
SRCS += $ { ASM }
$ { ASM } :
$ { _MKTARGET_CREATE }
printf '/* MINIX3 */\n\n/*\n * Compatibility jump table for renamed symbols.\n *\n * DO NOT EDIT: this file is automatically generated.\n */\n.global ${.PREFIX:S/^compat__//:C/([0-9]{2})$//};\n.global ${.PREFIX:S/^compat//};\n${.PREFIX:S/^compat__//:C/([0-9]{2})$//}: jmp ${.PREFIX:S/^compat//}\n' > $ { . TARGET }