diff mbox series

Update ELF auxv entry types

Message ID 20200228091207.16367-1-luis.machado@linaro.org
State New
Headers show
Series Update ELF auxv entry types | expand

Commit Message

Luis Machado Feb. 28, 2020, 9:12 a.m. UTC
I noticed GDB didn't know a particular AT tag (51) when doing some debugging.
Turns out we're missing a few entries compared to glibc's headers.

This patch adds them to the ELF include file. A separate GDB patch to use
these has been approved already.

include/ChangeLog:

YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

	* elf/common.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY)
	(AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE)
	(AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE, AT_L3_CACHEGEOMETRY)
	(AT_MINSIGSTKSZ): New defines, imported from glibc.
---
 include/elf/common.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

-- 
2.17.1

Comments

Nick Clifton March 3, 2020, 1:15 p.m. UTC | #1
Hi Luis,

> YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

> 

> 	* elf/common.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY)

> 	(AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE)

> 	(AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE, AT_L3_CACHEGEOMETRY)

> 	(AT_MINSIGSTKSZ): New defines, imported from glibc.


Approved and applied.

Cheers
  Nick
Luis Machado March 3, 2020, 1:23 p.m. UTC | #2
On Tue, 3 Mar 2020 at 10:15, Nick Clifton <nickc@redhat.com> wrote:

> Hi Luis,

>

> > YYYY-MM-DD  Luis Machado  <luis.machado@linaro.org>

> >

> >       * elf/common.h (AT_L1I_CACHESIZE, AT_L1I_CACHEGEOMETRY)

> >       (AT_L1D_CACHESIZE, AT_L1D_CACHEGEOMETRY, AT_L2_CACHESIZE)

> >       (AT_L2_CACHEGEOMETRY, AT_L3_CACHESIZE, AT_L3_CACHEGEOMETRY)

> >       (AT_MINSIGSTKSZ): New defines, imported from glibc.

>

> Approved and applied.

>

> Cheers

>   Nick

>


Thanks Nick!
diff mbox series

Patch

diff --git a/include/elf/common.h b/include/elf/common.h
index 53b72445ca..18c898cf6b 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1222,6 +1222,21 @@ 
 #define AT_L2_CACHESHAPE  36
 #define AT_L3_CACHESHAPE  37
 
+/* Shapes of the caches, with more room to describe them.
+   *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits
+   and the cache associativity in the next 16 bits.  */
+#define AT_L1I_CACHESIZE	40
+#define AT_L1I_CACHEGEOMETRY	41
+#define AT_L1D_CACHESIZE	42
+#define AT_L1D_CACHEGEOMETRY	43
+#define AT_L2_CACHESIZE		44
+#define AT_L2_CACHEGEOMETRY	45
+#define AT_L3_CACHESIZE		46
+#define AT_L3_CACHEGEOMETRY	47
+
+#define AT_MINSIGSTKSZ		51 /* Stack needed for signal delivery
+				      (AArch64).  */
+
 #define AT_FREEBSD_EXECPATH     15      /* Path to the executable. */
 #define AT_FREEBSD_CANARY       16      /* Canary for SSP. */
 #define AT_FREEBSD_CANARYLEN    17      /* Length of the canary. */