summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/bits/fcntl.h1
-rw-r--r--libc/sysdeps/linux/powerpc/crt1.S4
2 files changed, 5 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/powerpc/bits/fcntl.h b/libc/sysdeps/linux/powerpc/bits/fcntl.h
index a76d84fb5..ef1beeca0 100644
--- a/libc/sysdeps/linux/powerpc/bits/fcntl.h
+++ b/libc/sysdeps/linux/powerpc/bits/fcntl.h
@@ -54,6 +54,7 @@
# define O_DIRECT 0400000 /* Direct disk access. */
# define O_NOATIME 01000000 /* Do not set atime. */
# define O_PATH 010000000 /* Resolve pathname but do not open file. */
+# define O_TMPFILE 020040000 /* Atomically create nameless file. */
#endif
#ifdef __USE_LARGEFILE64
diff --git a/libc/sysdeps/linux/powerpc/crt1.S b/libc/sysdeps/linux/powerpc/crt1.S
index 27bfc5a5a..3f5d056c0 100644
--- a/libc/sysdeps/linux/powerpc/crt1.S
+++ b/libc/sysdeps/linux/powerpc/crt1.S
@@ -57,6 +57,10 @@ _start:
bl _GLOBAL_OFFSET_TABLE_-4@local
mflr r31
# endif
+ /* in PIC/PIE, plt stubs need r30 to point to the GOT if using secure-plt */
+# ifdef PPC_HAS_SECUREPLT
+ mr 30,31
+# endif
#endif
/* Set up the small data pointer in r13. */
#ifdef __PIC__