[PATCH] D91678: Symbolizer test for Basic block sections

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 21:16:58 PST 2020


dblaikie added a comment.

In D91678#2404576 <https://reviews.llvm.org/D91678#2404576>, @tmsriram wrote:

> In D91678#2404274 <https://reviews.llvm.org/D91678#2404274>, @dblaikie wrote:
>
>> Is it possible for the test case to be written in assembly and assembled during the test execution? (I realize a lot of the symbolizer tests are not written this way, but I think it's the direction we're generally moving in with these sort of tests) - good to still include the C source too, as you have.
>
> Thinking about this a bit more,two problems to solve if I need to get this in as assembly:
>
> 1. Ideally I want to link this with lld to use the symbol-ordering-file option to get the sections dis-contiguous.
> 2. Since I use hard-coded addresses to symbolize and check, any changes to the linker that affects the output address used might break this test.
>
> For 1) I could reorder the sections manually in the assembly to be discontiguous. I don't have a good solution for 2) other than maybe using nm to first get the address of the symbol and then symbolize it? Thoughts?

could be written in assembly in an object file (take the assembly for the object file - reorder the sections textually, then delete the section headers so it's just one big .text section) and symbolize the object file instead?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91678/new/

https://reviews.llvm.org/D91678



More information about the llvm-commits mailing list