[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)

Michael Spencer bigcheesegs at gmail.com
Fri Jul 30 23:06:19 PDT 2010

On Sat, Jul 31, 2010 at 12:37 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> On Fri, Jul 30, 2010 at 7:54 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
>> On Fri, Jul 30, 2010 at 2:34 PM, Daniel Dunbar <daniel at zuster.org> wrote:
>>> On Fri, Jul 30, 2010 at 11:05 AM, Michael Spencer <bigcheesegs at gmail.com> wrote:
>>>> I tried setting these to false, but the resulting executable (made
>>>> with link.exe) crashed. I looked at the differences in the object
>>>> file, but couldn't figure out what was causing it. I'm guessing
>>>> there's a bug in the path when these are false.
>>>> Now that I know what these flags do, I'll try and figure out exactly
>>>> what the problem is.
>>> If I had to guess, this is probably because the assembler isn't
>>> relaxing something that should be. Scattered symbols will hide this,
>>> because they will force most things to be relaxed, but I think we
>>> probably need a new bit to model the actual semantics in play. I've
>>> paged this stuff out, but I think the semantics the current
>>> implementation isn't modeling is the possible relocation of static
>>> symbols.
>>> If you try your example without the scattered symbols bit, but with
>>> -mc-relax-all, does the resulting binary work?
>>>  - Daniel
>> Can't do that with llc, but I'll just go change the code to force that
>> option in MC for this test.
> Err, I think it would be better to keep ScatteredSymbols=true than do
> that. At least that is more likely to generate correct code. Adding a
> FIXME above it is a fine start.

I meant as a way to get the same behavior as -mc-relax-all on my local
tree, not to commit.

>> Should the mc options be added to llc?
> Sure, if you like.

Will do.

- Michael Spencer

>  - Daniel
>> - Michael Spencer

More information about the llvm-dev mailing list