Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-29 Thread Tong Shen
On Sun, Sep 28, 2014 at 7:33 PM, Namhyung Kim wrote: > > Hmm.. IIUC for normal dso (ET_DYN), shdr->offset == shdr->sh_addr for > text section right? And we always adjust ET_EXEC and ET_REL.. What > about always trying to adjust symbol address then? We may precalculate > adjust offset and subtra

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-28 Thread Namhyung Kim
Hi Tong, On Thu, 25 Sep 2014 22:53:22 -0700, Tong Shen wrote: >> +/** >> + * is_non_relocatable_dyn - check if ELF file is ET_DYN, but not >> relocatable >> + * @ehdr: ELF header of the ELF file >> + * @shdr: a section header in the ELF file >> + * >> + * For ELF files

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-25 Thread Tong Shen
In my case it's not a prelink-ed dso; but I believe the effect is the same. Specifically: - Program headers and section headers contain absolute address; - Symbol addresses are also absolute; - There's no relocation in my case. On Thu, Sep 25, 2014 at 10:45 PM, Namhyung Kim wrote: > Hi Tong, > >

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-25 Thread Namhyung Kim
Hi Tong, Does a non-relocatable-dyn mean a prelink-ed dso? Thanks, Namhyung On Wed, 24 Sep 2014 17:28:24 -0700, Tong Shen wrote: > Gentle Ping :-) > > On Mon, Sep 15, 2014 at 11:06 AM, Tong Shen wrote: >> Gentle ping :-) >> >> On Thu, Sep 11, 2014 at 1:38 PM, Arnaldo Carvalho de Melo >> wrote

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-24 Thread Tong Shen
Gentle Ping :-) On Mon, Sep 15, 2014 at 11:06 AM, Tong Shen wrote: > Gentle ping :-) > > On Thu, Sep 11, 2014 at 1:38 PM, Arnaldo Carvalho de Melo > wrote: >> Em Thu, Sep 11, 2014 at 11:21:40AM -0700, Tong Shen escreveu: >>> Hi Arnaldo, >>> >>> Thanks a lot for the comment! >>> >>> I fixed the c

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-15 Thread Tong Shen
Gentle ping :-) On Thu, Sep 11, 2014 at 1:38 PM, Arnaldo Carvalho de Melo wrote: > Em Thu, Sep 11, 2014 at 11:21:40AM -0700, Tong Shen escreveu: >> Hi Arnaldo, >> >> Thanks a lot for the comment! >> >> I fixed the coding style and added a helper function with comments, as >> you suggested :-) >>

Re: [PATCH 1/1] perf tools: Fix Symbol Address for ET_DYN

2014-09-11 Thread Arnaldo Carvalho de Melo
Em Thu, Sep 11, 2014 at 11:21:40AM -0700, Tong Shen escreveu: > Hi Arnaldo, > > Thanks a lot for the comment! > > I fixed the coding style and added a helper function with comments, as > you suggested :-) > See attachment. That is much better, I'm adding lkml to the CC list so that we can give o