summaryrefslogtreecommitdiffstats
path: root/lib/elf_py.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:56:23 +0000
commitc15d6efd40655f717841d00839a43df1ead5cb26 (patch)
tree35d579f9a19170e2b39085669ca92533c2d161b4 /lib/elf_py.c
parentAdding upstream version 10.0.1. (diff)
downloadfrr-upstream.tar.xz
frr-upstream.zip
Adding upstream version 10.1.upstream/10.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/elf_py.c')
-rw-r--r--lib/elf_py.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/elf_py.c b/lib/elf_py.c
index 643495d..2b4fea3 100644
--- a/lib/elf_py.c
+++ b/lib/elf_py.c
@@ -1358,6 +1358,15 @@ bool elf_py_init(PyObject *pymod)
(void)methods_elfpy;
#endif
+#if defined(HAVE_GELF_GETNOTE) && defined(HAVE_ELF_GETDATA_RAWCHUNK)
+ PyObject *elf_notes = Py_True;
+#else
+ PyObject *elf_notes = Py_False;
+#endif
+ Py_INCREF(elf_notes);
+ if (PyModule_AddObject(pymod, "elf_notes", elf_notes))
+ Py_DECREF(elf_notes);
+
ELFFormatError = PyErr_NewException("_clippy.ELFFormatError",
PyExc_ValueError, NULL);
PyModule_AddObject(pymod, "ELFFormatError", ELFFormatError);