Skip to content

Commit

Permalink
sparc: Enable VDSO for static linking
Browse files Browse the repository at this point in the history
Checked on sparc64-linux-gnu and sparcv9-linux-gnu.

	[BZ #19767]
	* sysdeps/unix/sysv/linux/sparc/init-first.c: Remove #ifdef SHARED.
	* sysdeps/unix/sysv/linux/sparc/libc-vdso.h: Likewise.
	* sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL):
	Define.
  • Loading branch information
zatrazz committed Aug 5, 2019
1 parent 5e855c8 commit c9c1a41
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
2019-08-05 Adhemerval Zanella <[email protected]>

[BZ #19767]
* sysdeps/unix/sysv/linux/sparc/init-first.c: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/sparc/libc-vdso.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL):
Define.

[BZ #19767]
* sysdeps/unix/sysv/linux/s390/init-first.c: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/s390/libc-vdso.h: Likewise.
Expand Down
8 changes: 3 additions & 5 deletions sysdeps/unix/sysv/linux/sparc/init-first.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */

#ifdef SHARED
# include <dl-vdso.h>
# include <libc-vdso.h>
#include <dl-vdso.h>
#include <libc-vdso.h>

long int (*VDSO_SYMBOL (gettimeofday)) (struct timeval *, void *)
attribute_hidden;
Expand All @@ -40,7 +39,6 @@ _libc_vdso_platform_setup (void)
VDSO_SYMBOL (clock_gettime) = p;
}

# define VDSO_SETUP _libc_vdso_platform_setup
#endif
#define VDSO_SETUP _libc_vdso_platform_setup

#include <csu/init-first.c>
6 changes: 1 addition & 5 deletions sysdeps/unix/sysv/linux/sparc/libc-vdso.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,10 @@
#ifndef _LIBC_VDSO_H
#define _LIBC_VDSO_H

#ifdef SHARED

# include <sysdep-vdso.h>
#include <sysdep-vdso.h>

extern long int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)
attribute_hidden;
extern long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);

#endif

#endif /* _LIBC_VDSO_H */
3 changes: 3 additions & 0 deletions sysdeps/unix/sysv/linux/sparc/sysdep.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
#ifndef _LINUX_SPARC_SYSDEP_H
#define _LINUX_SPARC_SYSDEP_H 1

/* Always enable vsyscalls on sparc */
#define ALWAYS_USE_VSYSCALL 1

#include <sysdeps/unix/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/sparc/sysdep.h>
Expand Down

0 comments on commit c9c1a41

Please sign in to comment.