[libc-commits] [libc] [libc] Add function spec for `getauxval` (PR #97492)

Izaak Schroeder via libc-commits libc-commits at lists.llvm.org
Tue Jul 2 16:59:33 PDT 2024


https://github.com/izaakschroeder created https://github.com/llvm/llvm-project/pull/97492

None

>From 5e8a7062a951b829cd6fd99a53d55c86a331b9ed Mon Sep 17 00:00:00 2001
From: Izaak Schroeder <izaak.schroeder at gmail.com>
Date: Sun, 30 Jun 2024 13:44:52 -0700
Subject: [PATCH] [libc] Add function spec for `getauxval`

---
 libc/spec/gnu_ext.td | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libc/spec/gnu_ext.td b/libc/spec/gnu_ext.td
index 161bb4e4a0d9d..e360c766c5c54 100644
--- a/libc/spec/gnu_ext.td
+++ b/libc/spec/gnu_ext.td
@@ -237,7 +237,11 @@ def GnuExtensions : StandardSpec<"GNUExtensions"> {
       [], // Types
       [], // Enumerations
       [
-        //TODO: Add getauxval here
+          FunctionSpec<
+              "getauxval",
+              RetValSpec<UnsignedLongType>,
+              [ArgSpec<UnsignedLongType>]
+          >,
       ]  // Functions
   >;
 



More information about the libc-commits mailing list