diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-06-11 11:11:11 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-06-11 11:11:11 +0530 |
commit | 89fb6835583088059b8d8987c86caac33e37e5ea (patch) | |
tree | ffd867e682b478adbfe07fe0410c33c14b6e4002 /rt | |
parent | b8c61b4b1d6afb69190169764c1b141f4659e48b (diff) | |
download | glibc-89fb6835583088059b8d8987c86caac33e37e5ea.zip glibc-89fb6835583088059b8d8987c86caac33e37e5ea.tar.gz glibc-89fb6835583088059b8d8987c86caac33e37e5ea.tar.bz2 |
Fix symbol definitions for __clock_* functions
__clock_gettime and other __clock_* functions could result in an extra
PLT reference within libc.so if it actually gets used. None of the
code currently uses them, which is why this probably went unnoticed.
Diffstat (limited to 'rt')
-rw-r--r-- | rt/clock_getcpuclockid.c | 4 | ||||
-rw-r--r-- | rt/clock_getres.c | 4 | ||||
-rw-r--r-- | rt/clock_gettime.c | 5 | ||||
-rw-r--r-- | rt/clock_nanosleep.c | 6 | ||||
-rw-r--r-- | rt/clock_settime.c | 4 |
5 files changed, 12 insertions, 11 deletions
diff --git a/rt/clock_getcpuclockid.c b/rt/clock_getcpuclockid.c index 44d7724..d16ce14 100644 --- a/rt/clock_getcpuclockid.c +++ b/rt/clock_getcpuclockid.c @@ -21,7 +21,7 @@ #include <unistd.h> int -clock_getcpuclockid (pid_t pid, clockid_t *clock_id) +__clock_getcpuclockid (pid_t pid, clockid_t *clock_id) { /* We don't allow any process ID but our own. */ if (pid != 0 && pid != getpid ()) @@ -37,4 +37,4 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id) return ENOENT; #endif } -strong_alias (clock_getcpuclockid, __clock_getcpuclockid) +weak_alias (__clock_getcpuclockid, clock_getcpuclockid) diff --git a/rt/clock_getres.c b/rt/clock_getres.c index cd59b14..df19c40 100644 --- a/rt/clock_getres.c +++ b/rt/clock_getres.c @@ -21,10 +21,10 @@ /* Get resolution of clock. */ int -clock_getres (clockid_t clock_id, struct timespec *res) +__clock_getres (clockid_t clock_id, struct timespec *res) { __set_errno (ENOSYS); return -1; } -strong_alias (clock_getres, __clock_getres) +weak_alias (__clock_getres, clock_getres) stub_warning (clock_getres) diff --git a/rt/clock_gettime.c b/rt/clock_gettime.c index cc7936d..1c9e524 100644 --- a/rt/clock_gettime.c +++ b/rt/clock_gettime.c @@ -21,10 +21,11 @@ /* Get current value of CLOCK and store it in TP. */ int -clock_gettime (clockid_t clock_id, struct timespec *tp) +__clock_gettime (clockid_t clock_id, struct timespec *tp) { __set_errno (ENOSYS); return -1; } -strong_alias (clock_gettime, __clock_gettime) +weak_alias (__clock_gettime, clock_gettime) +libc_hidden_def (__clock_gettime) stub_warning (clock_gettime) diff --git a/rt/clock_nanosleep.c b/rt/clock_nanosleep.c index 24f8bc6..8779147 100644 --- a/rt/clock_nanosleep.c +++ b/rt/clock_nanosleep.c @@ -20,8 +20,8 @@ #include <time.h> int -clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, - struct timespec *rem) +__clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, + struct timespec *rem) { if (__builtin_expect (req->tv_nsec, 0) < 0 || __builtin_expect (req->tv_nsec, 0) >= 1000000000) @@ -33,5 +33,5 @@ clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, /* Not implemented. */ return ENOSYS; } -strong_alias (clock_nanosleep, __clock_nanosleep) +weak_alias (__clock_nanosleep, clock_nanosleep) stub_warning (clock_nanosleep) diff --git a/rt/clock_settime.c b/rt/clock_settime.c index 411a7ee..9249f26 100644 --- a/rt/clock_settime.c +++ b/rt/clock_settime.c @@ -21,10 +21,10 @@ /* Set CLOCK to value TP. */ int -clock_settime (clockid_t clock_id, const struct timespec *tp) +__clock_settime (clockid_t clock_id, const struct timespec *tp) { __set_errno (ENOSYS); return -1; } -strong_alias (clock_settime, __clock_settime) +weak_alias (__clock_settime, clock_settime) stub_warning (clock_settime) |