symbol.c (0aba7f036a56675b7fdc536757b4c49fc76a2208) | symbol.c (f766819cd5290d42efa55c505b9bed184fec17bf) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <dirent.h> 3#include <errno.h> 4#include <stdlib.h> 5#include <stdio.h> 6#include <string.h> 7#include <linux/capability.h> 8#include <linux/kernel.h> --- 1741 unchanged lines hidden (view full) --- 1750 u_int i; 1751 struct machine *machine = NULL; 1752 char *root_dir = (char *) ""; 1753 int ss_pos = 0; 1754 struct symsrc ss_[2]; 1755 struct symsrc *syms_ss = NULL, *runtime_ss = NULL; 1756 bool kmod; 1757 bool perfmap; | 1// SPDX-License-Identifier: GPL-2.0 2#include <dirent.h> 3#include <errno.h> 4#include <stdlib.h> 5#include <stdio.h> 6#include <string.h> 7#include <linux/capability.h> 8#include <linux/kernel.h> --- 1741 unchanged lines hidden (view full) --- 1750 u_int i; 1751 struct machine *machine = NULL; 1752 char *root_dir = (char *) ""; 1753 int ss_pos = 0; 1754 struct symsrc ss_[2]; 1755 struct symsrc *syms_ss = NULL, *runtime_ss = NULL; 1756 bool kmod; 1757 bool perfmap; |
1758 unsigned char build_id[BUILD_ID_SIZE]; | 1758 struct build_id bid; |
1759 struct nscookie nsc; 1760 char newmapname[PATH_MAX]; 1761 const char *map_path = dso->long_name; 1762 1763 perfmap = strncmp(dso->name, "/tmp/perf-", 10) == 0; 1764 if (perfmap) { 1765 if (dso->nsinfo && (dso__find_perf_map(newmapname, 1766 sizeof(newmapname), &dso->nsinfo) == 0)) { --- 45 unchanged lines hidden (view full) --- 1812 1813 /* 1814 * Read the build id if possible. This is required for 1815 * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work 1816 */ 1817 if (!dso->has_build_id && 1818 is_regular_file(dso->long_name)) { 1819 __symbol__join_symfs(name, PATH_MAX, dso->long_name); | 1759 struct nscookie nsc; 1760 char newmapname[PATH_MAX]; 1761 const char *map_path = dso->long_name; 1762 1763 perfmap = strncmp(dso->name, "/tmp/perf-", 10) == 0; 1764 if (perfmap) { 1765 if (dso->nsinfo && (dso__find_perf_map(newmapname, 1766 sizeof(newmapname), &dso->nsinfo) == 0)) { --- 45 unchanged lines hidden (view full) --- 1812 1813 /* 1814 * Read the build id if possible. This is required for 1815 * DSO_BINARY_TYPE__BUILDID_DEBUGINFO to work 1816 */ 1817 if (!dso->has_build_id && 1818 is_regular_file(dso->long_name)) { 1819 __symbol__join_symfs(name, PATH_MAX, dso->long_name); |
1820 if (filename__read_build_id(name, build_id, BUILD_ID_SIZE) > 0) 1821 dso__set_build_id(dso, build_id); | 1820 if (filename__read_build_id(name, &bid) > 0) 1821 dso__set_build_id(dso, bid.data); |
1822 } 1823 1824 /* 1825 * Iterate over candidate debug images. 1826 * Keep track of "interesting" ones (those which have a symtab, dynsym, 1827 * and/or opd section) for processing. 1828 */ 1829 for (i = 0; i < DSO_BINARY_TYPE__SYMTAB_CNT; i++) { --- 734 unchanged lines hidden --- | 1822 } 1823 1824 /* 1825 * Iterate over candidate debug images. 1826 * Keep track of "interesting" ones (those which have a symtab, dynsym, 1827 * and/or opd section) for processing. 1828 */ 1829 for (i = 0; i < DSO_BINARY_TYPE__SYMTAB_CNT; i++) { --- 734 unchanged lines hidden --- |