[LLVMdev] misc unused symbols: '_write' and '_abort'

Aaron Gray angray at beeb.net
Wed Jul 6 13:19:28 PDT 2005


> Why is that a problem?
>
> Is this actually a problem?  Have you actually tried linking the program
> and received unresolved symbol errors?  Having unused dangling labels like
> that can often occur for many reasons.  For example, a similar thing would
> happen to this program for many compilers:
>
>
> void abort(void);
> int main() { return 0; }
>
>
> OTOH, I'll note that you're hitting this because you're walking the list
> of functions in the module, not building a list of external symbols like
> the PPC backend is doing.  It specifically keeps track of external symbols
> (as the references to them are being emitted) and does basically what you
> need to do.  I would take a look at it if write/abort are really causing a
> problem.

okay, I have done a simular pre-pass that weeds out the used functions.

I have had to do a named structure 'pass' in the doInitialization function 
simular to the CBackend to deal with MASM's type system.

Aaron





More information about the llvm-dev mailing list