aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>2022-10-04 09:13:56 -0700
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>2022-10-04 19:59:49 -0700
commit9c48ba47b36c3b243727af49bfebb867d7930de3 (patch)
tree6536235c566d1e2c21b6ca6554aa39893b1c76d5
parent63418f080f7f47f5c0cd644850cd82474a541d10 (diff)
downloadfsf-binutils-gdb-9c48ba47b36c3b243727af49bfebb867d7930de3.zip
fsf-binutils-gdb-9c48ba47b36c3b243727af49bfebb867d7930de3.tar.gz
fsf-binutils-gdb-9c48ba47b36c3b243727af49bfebb867d7930de3.tar.bz2
gprofng: fix build with --enable-pgo-build=lto
gprofng/ChangeLog 2022-10-04 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/29579 * libcollector/dispatcher.c: Fix the symbol version in SYMVER_ATTRIBUTE. * libcollector/iotrace.c: Likewise. * libcollector/linetrace.c: Likewise. * libcollector/mmaptrace.c: Likewise. * libcollector/synctrace.c: Likewise.
-rw-r--r--gprofng/libcollector/dispatcher.c4
-rw-r--r--gprofng/libcollector/iotrace.c32
-rw-r--r--gprofng/libcollector/linetrace.c8
-rw-r--r--gprofng/libcollector/mmaptrace.c8
-rw-r--r--gprofng/libcollector/synctrace.c6
5 files changed, 30 insertions, 28 deletions
diff --git a/gprofng/libcollector/dispatcher.c b/gprofng/libcollector/dispatcher.c
index d3e4c52..d0e8f84 100644
--- a/gprofng/libcollector/dispatcher.c
+++ b/gprofng/libcollector/dispatcher.c
@@ -818,7 +818,7 @@ static int
__collector_timer_create_symver (int(real_timer_create) (), clockid_t clockid, struct sigevent *sevp,
timer_t *timerid);
-SYMVER_ATTRIBUTE (__collector_timer_create_2_3_3, timer_create@@GLIBC_2.3.3)
+SYMVER_ATTRIBUTE (__collector_timer_create_2_3_3, timer_create@GLIBC_2.3.3)
int
__collector_timer_create_2_3_3 (clockid_t clockid, struct sigevent *sevp,
timer_t *timerid)
@@ -1078,7 +1078,7 @@ __collector_pthread_create_symver (int(real_pthread_create) (),
void *(*func)(void*),
void *arg);
-SYMVER_ATTRIBUTE (__collector_pthread_create_2_1, pthread_create@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_pthread_create_2_1, pthread_create@GLIBC_2.1)
int
__collector_pthread_create_2_1 (pthread_t *thread,
const pthread_attr_t *attr,
diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
index d94daef..e7e8afa 100644
--- a/gprofng/libcollector/iotrace.c
+++ b/gprofng/libcollector/iotrace.c
@@ -1085,7 +1085,7 @@ static int
__collector_open64_symver (int(real_open64) (const char *, int, ...),
const char *path, int oflag, mode_t mode);
-SYMVER_ATTRIBUTE (__collector_open64_2_2, open64@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_open64_2_2, open64@GLIBC_2.2)
int
__collector_open64_2_2 (const char *path, int oflag, ...)
{
@@ -1650,7 +1650,7 @@ close (int fildes)
static FILE*
__collector_fopen_symver (FILE*(real_fopen) (), const char *filename, const char *mode);
-SYMVER_ATTRIBUTE (__collector_fopen_2_1, fopen@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_fopen_2_1, fopen@GLIBC_2.1)
FILE*
__collector_fopen_2_1 (const char *filename, const char *mode)
{
@@ -1762,7 +1762,7 @@ fopen (const char *filename, const char *mode)
static int
__collector_fclose_symver (int(real_fclose) (), FILE *stream);
-SYMVER_ATTRIBUTE (__collector_fclose_2_1, fclose@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_fclose_2_1, fclose@GLIBC_2.1)
int
__collector_fclose_2_1 (FILE *stream)
{
@@ -1886,7 +1886,7 @@ fflush (FILE *stream)
static FILE*
__collector_fdopen_symver (FILE*(real_fdopen) (), int fildes, const char *mode);
-SYMVER_ATTRIBUTE (__collector_fdopen_2_1, fdopen@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_fdopen_2_1, fdopen@GLIBC_2.1)
FILE*
__collector_fdopen_2_1 (int fildes, const char *mode)
{
@@ -2354,7 +2354,7 @@ fwrite (const void *ptr, size_t size, size_t nitems, FILE *stream)
static int
__collector_pread_symver (int(real_pread) (), int fildes, void *buf, size_t nbyte, off_t offset);
-SYMVER_ATTRIBUTE (__collector_pread_2_2, pread@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_pread_2_2, pread@GLIBC_2.2)
int
__collector_pread_2_2 (int fildes, void *buf, size_t nbyte, off_t offset)
{
@@ -2432,7 +2432,7 @@ pread (int fildes, void *buf, size_t nbyte, off_t offset)
#if !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32)
// map interposed symbol versions
-SYMVER_ATTRIBUTE (__collector_pwrite_2_2, pwrite@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_pwrite_2_2, pwrite@GLIBC_2.2)
int
__collector_pwrite_2_2 (int fildes, const void *buf, size_t nbyte, off_t offset)
{
@@ -2475,8 +2475,8 @@ __collector_pwrite_2_1 (int fildes, const void *buf, size_t nbyte, off_t offset)
POP_REENTRANCE (guard);
return ret;
}
-#endif /* !defined(__MUSL_LIBC) && ARCH(Intel) && WSIZE(32) */
+#else
ssize_t
pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
{
@@ -2497,13 +2497,14 @@ pwrite (int fildes, const void *buf, size_t nbyte, off_t offset)
POP_REENTRANCE (guard);
return ret;
}
+#endif
/*------------------------------------------------------------- pwrite64 */
-#if !defined(__MUSL_LIBC)
-#if ARCH(Intel) && WSIZE(32)
+#if WSIZE(32)
+#if !defined(__MUSL_LIBC) && ARCH(Intel)
// map interposed symbol versions
-SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_pwrite64_2_2, pwrite64@GLIBC_2.2)
ssize_t
__collector_pwrite64_2_2 (int fildes, const void *buf, size_t nbyte, off64_t offset)
{
@@ -2546,8 +2547,8 @@ __collector_pwrite64_2_1 (int fildes, const void *buf, size_t nbyte, off64_t off
POP_REENTRANCE (guard);
return ret;
}
-#endif
+#else
ssize_t
pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset)
{
@@ -2569,6 +2570,7 @@ pwrite64 (int fildes, const void *buf, size_t nbyte, off64_t offset)
return ret;
}
#endif
+#endif /* SIZE(32) */
/*------------------------------------------------------------- fgets */
char*
@@ -3252,7 +3254,7 @@ ftell (FILE *stream)
static int
__collector_fgetpos_symver (int(real_fgetpos) (), FILE *stream, fpos_t *pos);
-SYMVER_ATTRIBUTE (__collector_fgetpos_2_2, fgetpos@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_fgetpos_2_2, fgetpos@GLIBC_2.2)
int
__collector_fgetpos_2_2 (FILE *stream, fpos_t *pos)
{
@@ -3337,7 +3339,7 @@ fgetpos (FILE *stream, fpos_t *pos)
static int
__collector_fgetpos64_symver (int(real_fgetpos64) (), FILE *stream, fpos64_t *pos);
-SYMVER_ATTRIBUTE (__collector_fgetpos64_2_2, fgetpos64@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_fgetpos64_2_2, fgetpos64@GLIBC_2.2)
int
__collector_fgetpos64_2_2 (FILE *stream, fpos64_t *pos)
{
@@ -3419,7 +3421,7 @@ fgetpos64 (FILE *stream, fpos64_t *pos)
static int
__collector_fsetpos_symver (int(real_fsetpos) (), FILE *stream, const fpos_t *pos);
-SYMVER_ATTRIBUTE (__collector_fsetpos_2_2, fsetpos@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_fsetpos_2_2, fsetpos@GLIBC_2.2)
int
__collector_fsetpos_2_2 (FILE *stream, const fpos_t *pos)
{
@@ -3502,7 +3504,7 @@ fsetpos (FILE *stream, const fpos_t *pos)
static int
__collector_fsetpos64_symver (int(real_fsetpos64) (), FILE *stream, const fpos64_t *pos);
-SYMVER_ATTRIBUTE (__collector_fsetpos64_2_2, fsetpos64@@GLIBC_2.2)
+SYMVER_ATTRIBUTE (__collector_fsetpos64_2_2, fsetpos64@GLIBC_2.2)
int
__collector_fsetpos64_2_2 (FILE *stream, const fpos64_t *pos)
{
diff --git a/gprofng/libcollector/linetrace.c b/gprofng/libcollector/linetrace.c
index a209308..d67a66a 100644
--- a/gprofng/libcollector/linetrace.c
+++ b/gprofng/libcollector/linetrace.c
@@ -1355,7 +1355,7 @@ __collector_posix_spawn_symver (int(real_posix_spawn) (),
const posix_spawnattr_t *attrp,
char *const argv[], char *const envp[]);
-SYMVER_ATTRIBUTE (__collector_posix_spawn_2_15, posix_spawn@@GLIBC_2.15)
+SYMVER_ATTRIBUTE (__collector_posix_spawn_2_15, posix_spawn@GLIBC_2.15)
int
__collector_posix_spawn_2_15 (pid_t *pidp, const char *path,
const posix_spawn_file_actions_t *file_actions,
@@ -1465,7 +1465,7 @@ __collector_posix_spawnp_symver (int(real_posix_spawnp) (), pid_t *pidp,
const posix_spawnattr_t *attrp,
char *const argv[], char *const envp[]);
-SYMVER_ATTRIBUTE (__collector_posix_spawnp_2_15, posix_spawnp@@GLIBC_2.15)
+SYMVER_ATTRIBUTE (__collector_posix_spawnp_2_15, posix_spawnp@GLIBC_2.15)
int // Common interposition
__collector_posix_spawnp_2_15 (pid_t *pidp, const char *path,
const posix_spawn_file_actions_t *file_actions,
@@ -1597,7 +1597,7 @@ __collector_system (const char *cmd)
static FILE *
__collector_popen_symver (FILE*(real_popen) (), const char *cmd, const char *mode);
-SYMVER_ATTRIBUTE (__collector_popen_2_1, popen@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_popen_2_1, popen@GLIBC_2.1)
FILE *
__collector_popen_2_1 (const char *cmd, const char *mode)
{
@@ -1617,7 +1617,7 @@ __collector_popen_2_0 (const char *cmd, const char *mode)
return __collector_popen_symver (CALL_REALF (popen_2_0), cmd, mode);
}
-SYMVER_ATTRIBUTE (__collector__popen_2_1, _popen@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector__popen_2_1, _popen@GLIBC_2.1)
FILE *
__collector__popen_2_1 (const char *cmd, const char *mode)
{
diff --git a/gprofng/libcollector/mmaptrace.c b/gprofng/libcollector/mmaptrace.c
index bd299e6..867fead 100644
--- a/gprofng/libcollector/mmaptrace.c
+++ b/gprofng/libcollector/mmaptrace.c
@@ -1600,20 +1600,20 @@ dlopen (const char *pathname, int mode)
{
if (NULL_PTR (dlopen))
init_mmap_intf ();
- void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+ void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interposition
return __collector_dlopen_symver (CALL_REAL (dlopen), caller, pathname, mode);
}
#if !defined(__MUSL_LIBC) && ((ARCH(Intel) && WSIZE(32)) || ARCH(SPARC))
// map interposed symbol versions
-SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_dlopen_2_1, dlopen@GLIBC_2.1)
void *
__collector_dlopen_2_1 (const char *pathname, int mode)
{
if (NULL_PTR (dlopen_2_1))
init_mmap_intf ();
- void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+ void *caller = __builtin_return_address (0); // must be called inside dlopen first layer interposition
return __collector_dlopen_symver (CALL_REAL (dlopen_2_1), caller, pathname, mode);
}
@@ -1623,7 +1623,7 @@ __collector_dlopen_2_0 (const char *pathname, int mode)
{
if (NULL_PTR (dlopen_2_0))
init_mmap_intf ();
- void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interpostion
+ void* caller = __builtin_return_address (0); // must be called inside dlopen first layer interposition
return __collector_dlopen_symver (CALL_REAL (dlopen_2_0), caller, pathname, mode);
}
#endif
diff --git a/gprofng/libcollector/synctrace.c b/gprofng/libcollector/synctrace.c
index d48aeaa..39210f5 100644
--- a/gprofng/libcollector/synctrace.c
+++ b/gprofng/libcollector/synctrace.c
@@ -759,7 +759,7 @@ __collector_pthread_cond_wait_symver (int(real_pthread_cond_wait) (), pthread_co
#if ARCH(Intel) || ARCH(SPARC)
SYMVER_ATTRIBUTE (__collector_pthread_cond_wait_2_3_2,
- pthread_cond_wait@@GLIBC_2.3.2)
+ pthread_cond_wait@GLIBC_2.3.2)
#endif
int
__collector_pthread_cond_wait_2_3_2 (pthread_cond_t *cond, pthread_mutex_t *mutex)
@@ -852,7 +852,7 @@ __collector_pthread_cond_timedwait_symver (int(real_pthread_cond_timedwait) (),
#if ARCH(Intel) || ARCH(SPARC)
SYMVER_ATTRIBUTE (__collector_pthread_cond_timedwait_2_3_2,
- pthread_cond_timedwait@@GLIBC_2.3.2)
+ pthread_cond_timedwait@GLIBC_2.3.2)
#endif // ARCH()
int
__collector_pthread_cond_timedwait_2_3_2 (pthread_cond_t *cond,
@@ -984,7 +984,7 @@ pthread_join (pthread_t target_thread, void **status)
static int
__collector_sem_wait_symver (int(real_sem_wait) (), sem_t *sp);
-SYMVER_ATTRIBUTE (__collector_sem_wait_2_1, sem_wait@@GLIBC_2.1)
+SYMVER_ATTRIBUTE (__collector_sem_wait_2_1, sem_wait@GLIBC_2.1)
int
__collector_sem_wait_2_1 (sem_t *sp)
{