Fix: lttng-ust-elf.c: define NT_GNU_BUILD_ID if not defined
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Sat, 29 Oct 2016 17:32:57 +0000 (13:32 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 12 Jun 2017 20:49:18 +0000 (16:49 -0400)
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>
liblttng-ust/lttng-ust-elf.c

index 5f27920e48fa041f1d971677b56c643993064de9..beaa7f3b5269e4ae53297696c2789958c37066c3 100644 (file)
 
 #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.
This page took 0.026209 seconds and 4 git commands to generate.