#4013: build fails on OS X: Invalid Mach-O file:Address out of bounds while
relocating object file
----------------------------------+-----------------------------------------
Reporter: igloo | Owner: igloo
Type: bug | Status: closed
Priority: high | Milestone: 7.0.3
Component: Compiler | Version: 6.13
Resolution: fixed | Keywords:
Testcase: | Blockedby:
Difficulty: | Os: MacOS X
Blocking: | Architecture: x86
Failure: Building GHC failed |
----------------------------------+-----------------------------------------
Changes (by igloo):
* status: new => closed
* resolution: => fixed
Comment:
I've just successfully validated with
{{{
SupportsSplitObjs = YES
SplitObjs = YES
}}}
in mk/validate.mk, both 32bit and 64bit. Maybe it's a bug that was fixed
in 10.6, or in a newer XCode?
Hmmm:
{{{
$ cat q.s
.const_data
foo:
.long 123
.align 2
.text
.align 2
.long foo - bar + 16
.long 0
.long 125
bar:
.long 124
$ gcc -c q.s
$ ld -r q.o -o w.o
Segmentation fault
$ ls
q.o q.s
$ file q.o
q.o: Mach-O 64-bit object x86_64
$
}}}
But it now looks sensible in 32bit mode:
{{{
$ gcc -c q.s -m32
$ ld -r q.o -o w.o
$ otool -r ?.o
q.o:
Relocation information (__TEXT,__text) 2 entries
address pcrel length extern type scattered symbolnum/value
00000000 0 2 n/a 4 1 0x00000010
00000000 0 2 n/a 1 1 0x0000000c
w.o:
Relocation information (__TEXT,__text) 2 entries
address pcrel length extern type scattered symbolnum/value
00000000 0 2 n/a 4 1 0x00000010
00000000 0 2 n/a 1 1 0x0000000c
$
}}}
I've pushed
{{{
Sat Feb 19 19:14:09 GMT 2011 Ian Lynagh <[email protected]>
* Reenable object splitting on Darwin, now #4013 appears to be fixed
}}}
so we'll see if any remaining issues arise. Otherwise, it looks like this
was fixed by upstream.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4013#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs