aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/elf.h13
-rw-r--r--include/stdio.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/include/elf.h b/include/elf.h
index 14ed67f..1424982 100644
--- a/include/elf.h
+++ b/include/elf.h
@@ -15,6 +15,19 @@
# define ELF_NOTE_NEXT_OFFSET(namesz, descsz, align) \
ALIGN_UP (ELF_NOTE_DESC_OFFSET ((namesz), (align)) + (descsz), (align))
+# ifdef HIDDEN_VAR_NEEDS_DYNAMIC_RELOC
+# define DL_ADDRESS_WITHOUT_RELOC(expr) (expr)
+# else
+/* Evaluate EXPR without run-time relocation for it. EXPR should be an
+ array, an address of an object, or a string literal. */
+# define DL_ADDRESS_WITHOUT_RELOC(expr) \
+ ({ \
+ __auto_type _result = (expr); \
+ asm ("" : "+r" (_result)); \
+ _result; \
+ })
+# endif
+
/* Some information which is not meant for the public and therefore not
in <elf.h>. */
# include <dl-dtprocnum.h>
diff --git a/include/stdio.h b/include/stdio.h
index e48d709..3d917db 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -173,6 +173,10 @@ libc_hidden_proto (__fortify_fail)
/* The maximum number of varargs allowed in a __libc_message format string */
#define LIBC_MESSAGE_MAX_ARGS 4
+#define IOVEC_MAX_ERR_MSG "Fatal glibc error: Internal " \
+ "__libc_message error. Too many arguments.\n"
+#define IOVEC_MAX_ERR_MSG_LEN (sizeof (IOVEC_MAX_ERR_MSG) - 1)
+
_Noreturn void __libc_message_impl (const char *__fnt, ...) attribute_hidden
__attribute__ ((__format__ (__printf__, 1, 2)));