summaryrefslogtreecommitdiffstats
path: root/lib/elf_py.c
diff options
context:
space:
mode:
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);