Opened 4 years ago

Closed 3 years ago

#109 closed defect (fixed)

Build of pe/pec fails with GCC 4.7.3

Reported by: dmik Owned by:
Priority: major Milestone: next
Component: odin Version: 0.8.9
Severity: medium Keywords:


There is one incompatibility with GCC 4.7.3 in Odin: the PE and PEC tools.

They use custom startup code (to reserve as low virtual address in private memory space as possible — this is vital for some WIn32 .EXE files which have the very low virtual entry point which we must be able to provide as there is 1-to-1 address mapping).

However, GCC 4.7.3 puts a reference to __ehInit (C++ exception handling) in each object file it generates. And since we don't link to the normal CRT startup code in case of PE/PEC, this symbol remains undefined. This seems like a bug of GCC, more details are here:

Change History (4)

comment:1 Changed 4 years ago by psmedley

pe and pec built fine for me with gcc 4.7.3 (my own build not the rpm one)

comment:2 Changed 4 years ago by dmik

Can you check if pe.o (and other .o files) has a __ehInit reference?

comment:3 Changed 3 years ago by ydario

using -fno-asynchronous-unwind-tables produces a object file without unwinding table (so without eh_frame and _ehInit).

comment:4 Changed 3 years ago by dmik

  • Resolution set to fixed
  • Status changed from new to closed

The issue has been fixed within The new build of gcc 4.9.2 that includes this fix works well w/o the need to specify -fno-asynchronous-unwind-tables by hand as is now assumed by default on OS/2.

Note: See TracTickets for help on using tickets.