The general policy in OpenBSD is to not embed ident(1) strings in
libraries. However, libelf is currently compiled with ident strings, and
thus /usr/lib/libelf* are the only files in /usr/lib sporting ident
strings.

The following diff disables them.

Index: _elftc.h
===================================================================
RCS file: /OpenBSD/src/lib/libelf/_elftc.h,v
retrieving revision 1.2
diff -u -p -r1.2 _elftc.h
--- _elftc.h    2 Sep 2021 21:12:09 -0000       1.2
+++ _elftc.h    31 Aug 2022 18:55:31 -0000
@@ -316,11 +316,7 @@ struct name {                                              
        \
 #endif
 
 #if defined(__OpenBSD__)
-#if defined(__GNUC__)
-#define        ELFTC_VCSID(ID)         __asm__(".ident\t\"" ID "\"")
-#else
-#define        ELFTC_VCSID(ID)         /**/
-#endif /* __GNUC__ */
+#define        ELFTC_VCSID(ID)         /* intentionally disabled */
 #endif
 
 #endif /* ELFTC_VCSID */

Reply via email to