aboutsummaryrefslogtreecommitdiffstats
path: root/src/util/build_id.c
Commit message (Collapse)AuthorAgeFilesLines
* util/build-id: check dlpi_name before strstr callTapani Pälli2017-03-171-0/+6
| | | | | | | | | | | | According to dl_iterate_phdr man page first object visited is the main program where dlpi_name is an empty string. This fixes segfault on Android when using build-id as identifier. Fixes: d4fa083e11f ("util: Add utility build-id code.") Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Plamena Manolova <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
* util/build-id: Return a pointer rather than copying the dataJason Ekstrand2017-03-011-4/+3
| | | | | | | | We're about to use the build-id as the starting point for another SHA1 hash in the Intel Vulkan driver, and returning a pointer is far more convenient. Reviewed-by: Chad Versace <[email protected]>
* util/build-id: define ElfW and NT_GNU_BUILD_ID if neededJonathan Gray2017-02-201-0/+8
| | | | | | | | | Define ElfW() and NT_GNU_BUILD_ID if needed as these defines are not present on at least OpenBSD and FreeBSD. Fixes the build on OpenBSD. Fixes: d4fa083e11f ("util: Add utility build-id code.") Signed-off-by: Jonathan Gray <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* util: Add utility build-id code.Matt Turner2017-02-151-0/+109
Provides the ability to read the .note.gnu.build-id section of ELF binaries, which is inserted by the --build-id=... flag to ld. Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Chad Versace <[email protected]>