Upstream commit: fffc2df8a3e2c8cda2991063d23086360268b777 - i386: Provide GLIBC_ABI_GNU_TLS symbol version [BZ #33221] - i386: Update ___tls_get_addr to preserve vector registers - Extend struct r_debug to support multiple namespaces (RHEL-101985) - Fix a potential crash in the dynamic loader when processing specific symbol versions (RHEL-109683) - Signal la_objopen for ld.so with dlmopen (RHEL-109693) - Switch to main malloc after final ld.so self-relocation (RHEL-109703) - Prevent ld.so from asserting and crashing during audited library loads (RHEL-109702) - x86-64: Provide GLIBC_ABI_DT_X86_64_PLT symbol version (RHEL-109621) - x86-64, i386: Provide GLIBC_ABI_GNU2_TLS symbol version (RHEL-109625) - Ensure fallback initialization of ctype TLS data pointers to fix segfaults in programs using dlmopen or auditors (RHEL-72018) - Handle load segment gaps in _dl_find_object (RHEL-104854) - AArch64: Improve codegen in SVE log1p - AArch64: Optimize inverse trig functions - AArch64: Avoid memset ifunc in cpu-features.c [BZ #33112] Resolves: RHEL-109536 Resolves: RHEL-72018 Resolves: RHEL-101985 Resolves: RHEL-104854 Resolves: RHEL-109621 Resolves: RHEL-109625 Resolves: RHEL-109683 Resolves: RHEL-109693 Resolves: RHEL-109702 Resolves: RHEL-109703
36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
commit fef226255dda886d74dc72c5e43dbdde231cc74e
|
|
Author: Florian Weimer <fweimer@redhat.com>
|
|
Date: Fri Nov 29 15:36:40 2024 +0100
|
|
|
|
elf: Add the endswith function to <endswith.h>
|
|
|
|
And include <stdbool.h> for a definition of bool.
|
|
|
|
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
|
(cherry picked from commit a20bc2f6233a726c7df8eaa332b6e498bd59321f)
|
|
|
|
diff --git a/elf/endswith.h b/elf/endswith.h
|
|
index c6430c48be0c1071..3954e57f8eff0faa 100644
|
|
--- a/elf/endswith.h
|
|
+++ b/elf/endswith.h
|
|
@@ -17,6 +17,7 @@
|
|
#ifndef _ENDSWITH_H
|
|
#define _ENDSWITH_H
|
|
|
|
+#include <stdbool.h>
|
|
#include <string.h>
|
|
|
|
/* Return true if the N bytes at NAME end with with the characters in
|
|
@@ -30,4 +31,11 @@ endswithn (const char *name, size_t n, const char *suffix)
|
|
strlen (suffix)) == 0);
|
|
}
|
|
|
|
+/* Same as endswithn, but uses the entire SUBJECT for matching. */
|
|
+static inline bool
|
|
+endswith (const char *subject, const char *suffix)
|
|
+{
|
|
+ return endswithn (subject, strlen (subject), suffix);
|
|
+}
|
|
+
|
|
#endif /* _ENDSWITH_H */
|