aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorManjunath Matti <mmatti@linux.ibm.com>2024-03-19 15:29:48 -0500
committerPeter Bergner <bergner@linux.ibm.com>2024-03-19 17:19:27 -0500
commit3ab9b88e2ac91062b6d493fe32bd101a55006c6a (patch)
treea13cf4a7a73bb6f77748d2bfefedce381591be56 /elf
parent3d53d18fc71c5d9ef4773b8bce04d54b80181926 (diff)
downloadglibc-3ab9b88e2ac91062b6d493fe32bd101a55006c6a.zip
glibc-3ab9b88e2ac91062b6d493fe32bd101a55006c6a.tar.gz
glibc-3ab9b88e2ac91062b6d493fe32bd101a55006c6a.tar.bz2
powerpc: Add HWCAP3/HWCAP4 data to TCB for Power Architecture.
This patch adds a new feature for powerpc. In order to get faster access to the HWCAP3/HWCAP4 masks, similar to HWCAP/HWCAP2 (i.e. for implementing __builtin_cpu_supports() in GCC) without the overhead of reading them from the auxiliary vector, we now reserve space for them in the TCB. This is an ABI change for GLIBC 2.39. Suggested-by: Peter Bergner <bergner@linux.ibm.com> Reviewed-by: Peter Bergner <bergner@linux.ibm.com>
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-diagnostics.c2
-rw-r--r--elf/dl-support.c2
-rw-r--r--elf/elf.h4
3 files changed, 8 insertions, 0 deletions
diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c
index 7345ebc..aaf67b8 100644
--- a/elf/dl-diagnostics.c
+++ b/elf/dl-diagnostics.c
@@ -235,6 +235,8 @@ _dl_print_diagnostics (char **environ)
_dl_diagnostics_print_labeled_value ("dl_hwcap", GLRO (dl_hwcap));
_dl_diagnostics_print_labeled_value ("dl_hwcap_important", HWCAP_IMPORTANT);
_dl_diagnostics_print_labeled_value ("dl_hwcap2", GLRO (dl_hwcap2));
+ _dl_diagnostics_print_labeled_value ("dl_hwcap3", GLRO (dl_hwcap3));
+ _dl_diagnostics_print_labeled_value ("dl_hwcap4", GLRO (dl_hwcap4));
_dl_diagnostics_print_labeled_string
("dl_hwcaps_subdirs", _dl_hwcaps_subdirs);
_dl_diagnostics_print_labeled_value
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 2f502c8..451932d 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -158,6 +158,8 @@ const ElfW(Phdr) *_dl_phdr;
size_t _dl_phnum;
uint64_t _dl_hwcap;
uint64_t _dl_hwcap2;
+uint64_t _dl_hwcap3;
+uint64_t _dl_hwcap4;
enum dso_sort_algorithm _dl_dso_sort_algo;
diff --git a/elf/elf.h b/elf/elf.h
index f2206e5..55b2e87 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -1234,6 +1234,10 @@ typedef struct
#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size. */
#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment. */
+/* More machine-dependent hints about processor capabilities. */
+#define AT_HWCAP3 29 /* extension of AT_HWCAP. */
+#define AT_HWCAP4 30 /* extension of AT_HWCAP. */
+
#define AT_EXECFN 31 /* Filename of executable. */
/* Pointer to the global system page used for system calls and other