Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155729
b: refs/heads/master
c: d20ff6b
h: refs/heads/master
i:
  155727: 1fd4d77
v: v3
  • Loading branch information
Mike Galbraith authored and Peter Zijlstra committed Jul 22, 2009
1 parent 2bd7d85 commit f284119
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5beeded123c5befa21f1c6e16219f2a3eb7dd197
refs/heads/master: d20ff6bd6bba2e7e6681fa17565347b410c46ab3
7 changes: 5 additions & 2 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
GElf_Sym sym;
Elf_Scn *sec, *sec_strndx;
Elf *elf;
int nr = 0;
int nr = 0, kernel = !strcmp("[kernel]", self->name);

elf = elf_begin(fd, ELF_C_READ_MMAP, NULL);
if (elf == NULL) {
Expand Down Expand Up @@ -571,10 +571,13 @@ static int dso__load_sym(struct dso *self, int fd, const char *name,
nr_syms = shdr.sh_size / shdr.sh_entsize;

memset(&sym, 0, sizeof(sym));
self->adjust_symbols = (ehdr.e_type == ET_EXEC ||
if (!kernel) {
self->adjust_symbols = (ehdr.e_type == ET_EXEC ||
elf_section_by_name(elf, &ehdr, &shdr,
".gnu.prelink_undo",
NULL) != NULL);
} else self->adjust_symbols = 0;

elf_symtab__for_each_symbol(syms, nr_syms, index, sym) {
struct symbol *f;
const char *name;
Expand Down

0 comments on commit f284119

Please sign in to comment.