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:48:00 +0000 (16:48 -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 663699b7ce91a5d9febf0d9903b64d042a580782..a496841adb8804d6182ce901f52e9835828c5744 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.024563 seconds and 4 git commands to generate.