symbol.c (8d06367fa79c053a4a56a2ce0bb9e840f5da1236) | symbol.c (57f395a7eabb913d3605d7392be5bdb0837c9f3d) |
---|---|
1#include "util.h" 2#include "../perf.h" 3#include "string.h" 4#include "symbol.h" 5#include "thread.h" 6 7#include "debug.h" 8 --- 837 unchanged lines hidden (view full) --- 846 dso__fixup_sym_end(self); 847 err = nr; 848out_elf_end: 849 elf_end(elf); 850out_close: 851 return err; 852} 853 | 1#include "util.h" 2#include "../perf.h" 3#include "string.h" 4#include "symbol.h" 5#include "thread.h" 6 7#include "debug.h" 8 --- 837 unchanged lines hidden (view full) --- 846 dso__fixup_sym_end(self); 847 err = nr; 848out_elf_end: 849 elf_end(elf); 850out_close: 851 return err; 852} 853 |
854bool fetch_build_id_table(struct list_head *head) 855{ 856 bool have_buildid = false; 857 struct dso *pos; 858 859 list_for_each_entry(pos, &dsos, node) { 860 struct build_id_list *new; 861 struct build_id_event b; 862 size_t len; 863 864 if (filename__read_build_id(pos->long_name, 865 &b.build_id, 866 sizeof(b.build_id)) < 0) 867 continue; 868 have_buildid = true; 869 memset(&b.header, 0, sizeof(b.header)); 870 len = strlen(pos->long_name) + 1; 871 len = ALIGN(len, 64); 872 b.header.size = sizeof(b) + len; 873 874 new = malloc(sizeof(*new)); 875 if (!new) 876 die("No memory\n"); 877 878 memcpy(&new->event, &b, sizeof(b)); 879 new->dso_name = pos->long_name; 880 new->len = len; 881 882 list_add_tail(&new->list, head); 883 } 884 885 return have_buildid; 886} 887 |
|
854int filename__read_build_id(const char *filename, void *bf, size_t size) 855{ 856 int fd, err = -1; 857 GElf_Ehdr ehdr; 858 GElf_Shdr shdr; 859 Elf_Data *build_id_data; 860 Elf_Scn *sec; 861 Elf *elf; --- 540 unchanged lines hidden --- | 888int filename__read_build_id(const char *filename, void *bf, size_t size) 889{ 890 int fd, err = -1; 891 GElf_Ehdr ehdr; 892 GElf_Shdr shdr; 893 Elf_Data *build_id_data; 894 Elf_Scn *sec; 895 Elf *elf; --- 540 unchanged lines hidden --- |