D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6122 - OS X Mach-O: indirect symbol table offset is past end of file
Summary: OS X Mach-O: indirect symbol table offset is past end of file
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Mac OS X
: P2 normal
Assignee: No Owner
URL:
Keywords: bootcamp, DebugInfo
Depends on:
Blocks: 4044
  Show dependency treegraph
 
Reported: 2011-06-07 12:00 UTC by Robert Clipsham
Modified: 2020-09-28 02:00 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Robert Clipsham 2011-06-07 12:00:15 UTC
Create a D file, eg:
----
// test.d
void foo(){}
----
Compile:
$ dmd -c test.d -oftest.o
Use otool:
$ otool -I test.o
(that's a capital i if in case of the font being bad).
The output will be something like:
----
test.o:
indirect symbol table offset is past end of file
----
An object file as outputted by gcc or clang does not display the same issue. After linking the D version does not either. Changing backend/machobj.c:994 to use foffset -1 fixes the issue and does not seem to cause any side effects, given my complete lack of knowledge about the file format I thought I better report this for a proper fix.
Comment 1 Ben 2019-11-26 23:38:05 UTC
This doesn't seem to be reproducible anymore (tested on macos 10.15.1).  Should probably be closed.
Comment 2 Mathias LANG 2020-09-28 02:00:44 UTC
Tested on Mac OSX 10.15 too, and can't reproduce. Tested a few other approaches and couldn't trigger the message with `otools -I` so closing as WORKSFORME.