[Patch] Don't declare all text sections at the start of the .s

Adrian Prantl aprantl at apple.com
Fri Mar 13 15:52:27 PDT 2015


The last time I fixed such an issue was in r199681, which ensured the __cstring section comes before the debug info.
To prevent regressing here again, it would be nice to have an assertion that verifies that the first time we are switching to any __TEXT section we have not yet emitted any of the debug info sections.

-- adrian


> On Mar 13, 2015, at 6:18 AM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
> 
> On 12 March 2015 at 20:15, Jim Grosbach <grosbach at apple.com> wrote:
>> Very interesting. You’re right about the underlying problem. The file header there is to pre-set the final order of the sections, the goal of which is as you point out, to prevent debug info from changing actual code. This particular idiom goes back a ways (at least 2007) and pre-dates LLVM+MachO. As such, my worry here is that there may be other dependencies which have (likely inadvertently) crept in since then. That doesn’t mean this isn’t the right thing to do, of course, but rather that lots of testing is in order so that we can identify and fix any of those things.
>> 
> 
> What kind of testing would you be looking for?
> 
> All that I can think of is building with/without -g for apple darwin
> and comparing.
> 
> Cheers,
> Rafael
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list