projects
/
platform
/
upstream
/
elfutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 0.160
[platform/upstream/elfutils.git]
/
libelf
/
libelfP.h
diff --git
a/libelf/libelfP.h
b/libelf/libelfP.h
index
7da2370
..
52cf745
100644
(file)
--- a/
libelf/libelfP.h
+++ b/
libelf/libelfP.h
@@
-587,4
+587,8
@@
extern uint32_t __libelf_crc32 (uint32_t crc, unsigned char *buf, size_t len)
/* Align offset to 4 bytes as needed for note name and descriptor data. */
#define NOTE_ALIGN(n) (((n) + 3) & -4U)
/* Align offset to 4 bytes as needed for note name and descriptor data. */
#define NOTE_ALIGN(n) (((n) + 3) & -4U)
+/* Convenience macro. */
+#define INVALID_NDX(ndx, type, data) \
+ unlikely ((data)->d_size / sizeof (type) <= (unsigned int) (ndx))
+
#endif /* libelfP.h */
#endif /* libelfP.h */