5331 – mach format problem

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5331 - mach format problem
Summary: mach format problem
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Mac OS X
: P2 blocker
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2010年12月08日 03:38 UTC by Alex Burton
Modified: 2010年12月21日 00:51 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Alex Burton 2010年12月08日 03:38:56 UTC
While compiling (linking) wxd on OSX 10.6 with dmd2 v2.050
/usr/bin/ranlib: object: ../libwxd.a(Accelerator.o) malformed object (LC_SEGMENT command 0 filesize field greater than vmsize field)
in dmd/backend/machobj.c :
search for 
segment_cmd.vmsize
change :
 segment_cmd.vmsize = vmaddr;
 segment_cmd.filesize = foffset - segment_cmd.fileoff;
to :
 segment_cmd.vmsize = vmaddr;
 segment_cmd.filesize = foffset - segment_cmd.fileoff;
 if (segment_cmd.filesize > vmaddr)
 	segment_cmd.vmsize = segment_cmd.filesize;
and then rebuild dmd2
And the problem is fixed, although I doubt that this is the proper way to fix it.


AltStyle によって変換されたページ (->オリジナル) /