On uClibc, NT_GNU_BUILD_ID is not defined, so we define it
manually in this case.
This definition is the number given to the .note.gnu.build-id section
(of type SHT_NOTE) of a linked ELF object.
The ELF note headers give name "GNU" and type 3 (NT_GNU_BUILD_ID)
for a build ID note, of which there can be only one in a linked object
[...]
See http://fedoraproject.org/wiki/RolandMcGrath/BuildID
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#define BUF_LEN 4096
+#ifndef NT_GNU_BUILD_ID
+# define NT_GNU_BUILD_ID 3
+#endif
+
/*
* Retrieve the nth (where n is the `index` argument) phdr (program
* header) from the given elf instance.