From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 868C326B3C for ; Mon, 5 Aug 2024 08:56:25 +0200 (CEST) Received: (qmail 32691 invoked by uid 550); 5 Aug 2024 06:56:21 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32645 invoked from network); 5 Aug 2024 06:56:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=hacktivis.me; h=from:to :cc:date:message-id:mime-version:content-transfer-encoding; s= 20240308_115322; bh=eRCxIy6vXgtXvKNdSYjnjQbbvYmNh5GzF+YjEIkfkvQ=; b= oLA3Tjj3TG0watwyqaHZeHyaok3b9WSt4HjDpZkuSDvcg+hrMfDN8h5JUY8jv6ue vS0kjd5na6x95Nn0vVslvT+SXPPQ0nhsJu21xCLTx00nRyq/Y/nLDQDw093faH9Z pD50y5CaW/q15kieNcBfYwx7CH1rsipII5qdkvarhW6EWUTODqWnjosvDuFho8V+ rXP/NIRW7PhuA52NMJScc3aMzMRlatkidjgNB6mnD68I+tafN2HhJFnDj1DQG0J+ 4nPxNBZ7vah9iqUIHuoaMgOCyZ2vL4wBE/+sAtDChjVwUh7eAl3+V01s6QH2+K4r BrTU3BW2GpQF1ZZNK68zJxmRScjIj2cx1Os2EkrRyJ/ZvX97nlRhwzP9brf3SP0K azv5qgP24W34E5dQ4aUqWfMD4LwZN5G4MZP5b2E2x9vp71oWMKUr3aJvEnI2lFkj oArgdtbL8iYMPiCE/wQyJ7hJgi9Y1zJd8hTqQRYzJVdKhIQQ07M9LIgLUV+rlv05 egmoq9rv/+WS9/y5kmVDxjP6gU27brVlH9KvDpR1I5f4VfHm3hPkuk3Pe+++gsPa SpKggFtU/ottfDYhfmiQphffSU49E2toVxymmgaqzsdxRRxrVVrHHYbUqqG5bZ4L vbj3lphb5pOoRQr6xyO4f1Lv3btMxRSVusTwY5zcZw8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=hacktivis.me; h=from:to:cc :date:message-id:mime-version:content-transfer-encoding; q=dns; s=20240308_115322; b=P3UZPXY9T6ouxsWyUG/jTNgUt9Zw+Nh0zEf18iVBCW cf5FhgFXuzwtpGK/c5KKq+beJoS7VPfFnJHi50TLxTQ2wYldCfnGwK6AGXS759uU OzOUKlr6OrxI06c8XON8rpnD1J89v0hOnTVSOBV7k6c67g0ekqsI5iw6i9vqepgi aTZnDUv5F833iafR8zYPV5ipngB+WjB3IkweCqDSXyuH1aF5TrxpHvj0VLMc9/ck HSnWzvFCemiu2ffvJWbgzfPzC+OiCbYKqM7hxThRzmY2Baf0+N8pLDLkfUkDoCEM jjvTzpu+Hh3ajWy+SmaIlGVEAO2hQK5RdUi+xB4IPivoEQEQA0VBi4zCyuRviUIG GtF5b53un9/vzbPKI2MeGAmuhKCulUAP4S0vWIbxrgdM52beDvVwW/eNnJw3QsZW leC8/zIH4RvEjHFCSXaBVa+t71BRn33SZP7M76wIPfoj0R+c0QgVVqASHxGy5qOE rqGfkRLpIEwpy6Z0g893u5NYZRSFbteHBbWeYlv1pGzWuKZLda1gd+6F96dYqptn NfkQ1KMiHbOdpAYo7ZuFAajJR14IFAaTgU9+7Aege5EbuaxABZo6qVJFO48IMs9C HqUw/lKIMzbQe6txkQ+4k1DOoUpSI7VEjCDchaE8lWU+XD1YbN9IqCWn6IE5GAkh U= From: contact@hacktivis.me To: musl@lists.openwall.com Cc: "Haelwenn (lanodan) Monnier" Date: Mon, 5 Aug 2024 08:56:05 +0200 Message-ID: <20240805065607.22897-1-contact@hacktivis.me> X-Mailer: git-send-email 2.44.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [musl] [PATCH v2 1/3] src/signal/sys_signame.c: create hidden value-name table of signals From: "Haelwenn (lanodan) Monnier" --- src/include/signal.h | 2 ++ src/signal/sys_signame.c | 41 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 src/signal/sys_signame.c diff --git a/src/include/signal.h b/src/include/signal.h index bb566784..6bbc51d9 100644 --- a/src/include/signal.h +++ b/src/include/signal.h @@ -11,4 +11,6 @@ hidden void __restore_sigs(void *); hidden void __get_handler_set(sigset_t *); +hidden extern const char __sys_signame[SIGSYS+1][sizeof("STKFLT")]; + #endif diff --git a/src/signal/sys_signame.c b/src/signal/sys_signame.c new file mode 100644 index 00000000..e086572c --- /dev/null +++ b/src/signal/sys_signame.c @@ -0,0 +1,41 @@ +#include + +#define SIG(s) [SIG##s] = #s +const char __sys_signame[SIGSYS+1][sizeof("STKFLT")] = { + SIG(HUP), + SIG(INT), + SIG(QUIT), + SIG(ILL), + SIG(TRAP), + SIG(ABRT), + SIG(BUS), + SIG(FPE), + SIG(KILL), + SIG(USR1), + SIG(SEGV), + SIG(USR2), + SIG(PIPE), + SIG(ALRM), + SIG(TERM), +#if defined(SIGSTKFLT) + SIG(STKFLT), +#endif +#if defined(SIGEMT) + SIG(EMT), +#endif + SIG(CHLD), + SIG(CONT), + SIG(STOP), + SIG(TSTP), + SIG(TTIN), + SIG(TTOU), + SIG(URG), + SIG(XCPU), + SIG(XFSZ), + SIG(VTALRM), + SIG(PROF), + SIG(WINCH), + SIG(IO), + SIG(PWR), + SIG(SYS) +}; -- 2.44.2