Re: Fix AArch64 "$x" symbols
Maynard Johnson <[email protected]>
| Newsgroups | gmane.linux.oprofile |
|---|---|
| Message-ID | <[email protected]> |
On 07/31/2014 10:13 AM, Andrew Haley wrote:
> I think this is the correct fix:
Andrew,
I think so too, especially in light of what Will has shown in his note. Although I don't really know what these special symbols are used for, I can see how they may have the same starting address of some other symbol. In libutil++/op_bfd.cpp:get_symbols, we iterate over the collection of symbols we got from libbfd and remove duplicates (i.e., where the vma is the same). It seems that the algorithm just happens to be keeping the $x symbol instead of the one we want. Following the removal of the duplicates, we then ascertain the length of each symbol that's still left in the collection. So the $x symbols end up having a non-zero length given to them by virtue of how that algorithm works. So I believe filtering out the $x symbols before removing duplicates should fix this.
I'll commit this patch later today or tomorrow if I don't hear anything contrary from either you or Will.
Thanks.
-Maynard
>
> diff --git a/libutil++/bfd_support.cpp b/libutil++/bfd_support.cpp
> index a3bee99..d5fd70d 100644
> --- a/libutil++/bfd_support.cpp
> +++ b/libutil++/bfd_support.cpp
> @@ -475,7 +475,8 @@ bool interesting_symbol(asymbol * sym)
> /* ARM assembler internal mapping symbols aren't interesting */
> if ((strcmp("$a", sym->name) == 0) ||
> (strcmp("$t", sym->name) == 0) ||
> - (strcmp("$d", sym->name) == 0))
> + (strcmp("$d", sym->name) == 0) ||
> + (strcmp("$x", sym->name) == 0))
> return false;
>
> // C++ exception stuff
>
> Andrew.
>
>
> ------------------------------------------------------------------------------
> Infragistics Professional
> Build stunning WinForms apps today!
> Reboot your WinForms applications with our WinForms controls.
> Build a bridge from your legacy apps to the future.
> http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
> _______________________________________________
> oprofile-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oprofile-list
>
------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk