diff options
Diffstat (limited to 'libc/sysdeps/linux/x86_64')
| -rw-r--r-- | libc/sysdeps/linux/x86_64/bits/fcntl.h | 2 | ||||
| -rw-r--r-- | libc/sysdeps/linux/x86_64/bits/stat.h | 4 | ||||
| -rw-r--r-- | libc/sysdeps/linux/x86_64/crt1.S | 12 | 
3 files changed, 15 insertions, 3 deletions
| diff --git a/libc/sysdeps/linux/x86_64/bits/fcntl.h b/libc/sysdeps/linux/x86_64/bits/fcntl.h index 3547a2046..821b2e3cc 100644 --- a/libc/sysdeps/linux/x86_64/bits/fcntl.h +++ b/libc/sysdeps/linux/x86_64/bits/fcntl.h @@ -259,3 +259,5 @@ extern ssize_t tee (int __fdin, int __fdout, size_t __len,  #endif  __END_DECLS +/* Include generic Linux declarations.  */ +#include <bits/fcntl-linux.h> diff --git a/libc/sysdeps/linux/x86_64/bits/stat.h b/libc/sysdeps/linux/x86_64/bits/stat.h index a7412c8f9..a8c75feaa 100644 --- a/libc/sysdeps/linux/x86_64/bits/stat.h +++ b/libc/sysdeps/linux/x86_64/bits/stat.h @@ -77,7 +77,7 @@ struct stat  #else      __blkcnt64_t st_blocks;		/* Number 512-byte blocks allocated. */  #endif -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the @@ -138,7 +138,7 @@ struct stat64  #endif      __blksize_t st_blksize;	/* Optimal block size for I/O.  */      __blkcnt64_t st_blocks;	/* Nr. 512-byte blocks allocated.  */ -#ifdef __USE_MISC +#if defined(__USE_MISC) || defined(__USE_XOPEN2K8)      /* Nanosecond resolution timestamps are stored in a format         equivalent to 'struct timespec'.  This is the type used         whenever possible but the Unix namespace rules do not allow the diff --git a/libc/sysdeps/linux/x86_64/crt1.S b/libc/sysdeps/linux/x86_64/crt1.S index 87777dd5d..151aeffeb 100644 --- a/libc/sysdeps/linux/x86_64/crt1.S +++ b/libc/sysdeps/linux/x86_64/crt1.S @@ -80,6 +80,16 @@ _start:  	   the outermost frame obviously.  */  	xorl %ebp, %ebp +#ifdef L_rcrt1 +	pushq %rdi                          /* save rdi (but should be 0...) */ +	pushq %rdx                          /* store rdx (rtld_fini) */ +	lea  __ehdr_start(%rip), %rdi       /* "Calculate" load address... */ +	call reloc_static_pie               /* relocate dynamic addrs */ +	xorq %rax, %rax                     /* cleanup */ +	popq %rdx +	popq %rdi +#endif +  	/* Extract the arguments as encoded on the stack and set up  	   the arguments for __libc_start_main (int (*main) (int, char **, char **),  		   int argc, char *argv, @@ -107,7 +117,7 @@ _start:  	   which grow downwards).  */  	pushq %rsp -#if defined(L_Scrt1) +#if defined(L_Scrt1) || defined(L_rcrt1)  	/* Give address for main() */  	movq main@GOTPCREL(%rip), %rdi | 
