[LLVMbugs] [Bug 315] abort, don't warn, when missing external functions encountered

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jun 1 14:50:59 PDT 2004


sabre at nondot.org changed:

           What    |Removed                     |Added
           Severity|minor                       |critical
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

------- Additional Comments From sabre at nondot.org  2004-06-01 16:50 -------
This bug is now implemented:

We now explicitly support calling __main even if it is not defined, though this
causes a run-time warning to be printed.  Use of any other undefined external
function causes the program to abort.

I implemented this because of a REALLY nasty problem where the lli would do a
"dlsym" looking for __main in the lli process.  On cygwin, __main is used to
initialize the static ctors of the lli process, so it would be found and called
by bytecode file being JIT'd.  This caused the static initializers to be run
twice for the JIT, causing all kinds of chaos.  Needless to say, finding this b
ug was, uhh, nontrivial.

This is a critical bug because it prevents building LLVM on cygwin.  The problem
is that building the C front-end requires the ability to run simple "hello
world" type of programs produced by LLVM GCC (used by the libstdc++ configure
script) but we need the whole CFE to be around to build crtend, which contains


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

More information about the llvm-bugs mailing list