This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Way to disable relocations being performed


Em Sun, Jun 28, 2009 at 02:07:35PM -0700, Roland McGrath escreveu:
> > For me it is not relevant at all, I just need the type definitions and
> > function parameter list, variable name/type, etc. Only in very specific
> > cases I want addresses, and even then no need for relocations in most
> > cases.
> 
> If you are dealing with an ET_REL file on an SHT_RELA architecture, then
> you need relocation of the pointers inside and between the different DWARF
> sections.  In short, you can't handle an ET_REL file at all without doing
> some kind of relocation.
> 
> > I'll look at the dwfl internals to figure out where is that it ends up using
> > dwfl_linux_kernel_ prefixed routines...
> 
> Well, just set a breakpoint and look at the backtrace from your code.
> The only implicit calls to any such things in libdwfl come from the argp
> callbacks for -k/-K options.

Nevermind, it was a bug in the kernel perf tools, getting confused with
prelinked libraries :-\

I fixed it and now it makes more sense and its in line with what oprofile
reports:

[acme(a)doppio pahole]$ perf report --sort comm,dso,symbol --dsos /usr/lib64/libdw-0.141.so | head -20

#
# (135909 samples)
#
# Overhead           Command  Shared Object              Symbol
# ........  ................  .........................  ......
#
    43.39%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdw_find_attr
    27.16%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdw_form_val_len
     5.79%            pahole  /usr/lib64/libdw-0.141.so  [.] lookup
     4.99%            pahole  /usr/lib64/libdw-0.141.so  [.] findcu_cb
     4.14%            pahole  /usr/lib64/libdw-0.141.so  [.] __dwarf_attr_internal
     2.14%            pahole  /usr/lib64/libdw-0.141.so  [.] __dwarf_siblingof_internal
     1.13%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdw_findcu
     0.98%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdw_get_uleb128
     0.97%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_tag
     0.94%            pahole  /usr/lib64/libdw-0.141.so  [.] __libdw_formref
     0.87%            pahole  /usr/lib64/libdw-0.141.so  [.] __dwarf_formsdata_internal
     0.83%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_decl_file
     0.79%            pahole  /usr/lib64/libdw-0.141.so  [.] dwarf_getsrclines
[acme(a)doppio pahole]$

Sorry for the noise,

- Arnaldo

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]