Thread overview
[Issue 2932] New: bad e_ehsize (36 != 52)
May 04, 2009
d-bugmail
May 06, 2009
d-bugmail
Jun 23, 2009
Leandro Lucarella
Jul 09, 2009
Walter Bright
May 04, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2932

           Summary: bad e_ehsize (36 != 52)
           Product: D
           Version: 1.043
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: llucax@gmail.com


When linking any D program using the GNU Gold linker [http://en.wikipedia.org/wiki/Gold_(linker)], I get these errors:

/usr/bin/ld: hello.o: bad e_ehsize (36 != 52)
/usr/bin/ld: /home/luca/tesis/dmd/linux/bin/..
/lib/libphobos.a(dmain2_190_1a5.o): bad e_ehsize (36 != 52)

This is repeated for each .o file in the .a static library.

This might trigger a bug in GNU Gold itself: http://sourceware.org/bugzilla/show_bug.cgi?id=10126


-- 

May 06, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2932





------- Comment #1 from llucax@gmail.com  2009-05-06 08:47 -------
BTW, GNU Gold works great with gdc and ldc, so it looks like it's definitely not a frontend problem.

GNU Gold is supposed to replace the old GNU ld linker sooner than later, so I suggest that DMD should be fixed sooner than later too =)


-- 

June 23, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2932





--- Comment #2 from Leandro Lucarella <llucax@gmail.com>  2009-06-23 06:03:49 PDT ---
This seems to be a DMD error indeed. Here is what the Gold author said:

"""
The object file you attached does indeed have an e_ehsize field with a
value of 36.  The e_ehsize field is supposed to hold the size of the ELF file
header.  The ELF file header should be 52 bytes long.  36 bytes omits the last
7
fields--although the fields do appear to be actually present.  There is
something wrong with the compiler which is generating this object file.  My
best
guess is that the person who wrote the object file creation code did not
realize
that the 16 byte magic number field is included in the size of the file header.
I would be happy to help explain the problem the the authors of this code, if
necessary.
"""

(the object file he is talking about is an object file generated by DMD)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 09, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2932


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED




--- Comment #3 from Walter Bright <bugzilla@digitalmars.com>  2009-07-09 02:49:25 PDT ---
Fixed dmd 1.046 and 2.031

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------