To correctly generate the import library for a package we need to resolve the dangling external symbols of all units. For this each unit now stores which symbols it exported from another unit and it also stores all global and external assembler symbols it has (maybe this can be streamlined later on, but for now this works).

entfile.pas:
  + new entry for the imported unit symbols; for the global assembler symbols a deprecated entry is revived
fmodule.pas, tmodule:
  + new field globalasmsyms which holds all global/external assembler symbols of a unit
  + new field unitimportsyms which holds all symbols imported by a unit from another unit
  + new method to extract all global/external assembler symbols of a unit
  * create, destroy & reset: correctly instantiate/free the two new lists
fppu.pas, tppumodule:
  + new field unitimportsymsderefs to hold the derefs during loading from/storing to PPU
  + new method buildderefunitimportsyms to generate the derefs for each imported symbol
  + new method derefunitimportsyms to resolve each imported symbol deref
  + new method readunitimportsyms to read the imported symbols from the PPU
  + new method writeunitimportsyms to write all imported symbols to the PPU
  + new method writeasmsymbols to write all global/external assembler symbols to the PPU
  + new method readasmsymbols to read all global/external assembler symbols from the PPU
  * load_implementation: read the assembler symbols and the imported symbols if their respective entry is encountered
  * writeppu: generate the derefs and write them and the assembler symbols to PPU
  * load_usedunits: resolve the imported symbols once all derefs are known
pmoudles.pas:
  * finish_unit: extract all global/external assembler symbols before writing the PPU
symtable.pas:
  * addsymref: if the symbol is not from the current unit than mark it as imported
ppu.pas:
  * increase PPU version

git-svn-id: http://svn.freepascal.org/svn/fpc/branches/svenbarth@28846 3ad0048d-3df7-0310-abae-a5850022a9f2