Michael Spencer
2010-Jul-31 02:54 UTC
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
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? > > - DanielCan't do that with llc, but I'll just go change the code to force that option in MC for this test. Should the mc options be added to llc? - Michael Spencer
Daniel Dunbar
2010-Jul-31 04:37 UTC
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
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.> Should the mc options be added to llc?Sure, if you like. - Daniel> - Michael Spencer >
Michael Spencer
2010-Jul-31 06:06 UTC
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
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 >> >
Michael Spencer
2010-Jul-31 06:58 UTC
[LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
On Sat, Jul 31, 2010 at 12:37 AM, Daniel Dunbar <daniel at zuster.org> wrote:> 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 tested it all out. Setting relax all to true doesn't fix the problem, however, HasAbsolutizedSet was unneeded. - Michael Spencer
Apparently Analagous Threads
- [LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
- [LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
- [LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
- [LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)
- [LLVMdev] Win32 COFF Support patch 5 (the final patch in the saga!)