David,

A dependency tree is constructed so the library constructors get called in the 
correct sequence. If it does not work it is likely a bug in the libraries INF 
file not listing the LibraryClass it depends on. If the driver also listed this 
library it could appear that the library works, when in reality it has a bug in 
the INF file. A good rule of thumb is to look in your library at the libraries 
that where included via an #include statement and make sure they are listed in 
the library INF file. If you miss an #include of a library function you call 
you will get a compiler error. 

Since the DSC gets  to chose the library instance for the library class this 
dependency is only known at build time and the constructor ends up in the build 
generated AutoGen.c file. 

Thanks,

Andrew Fish


On Sep 10, 2013, at 6:25 PM, "David F." <[email protected]> wrote:

> Hi,
> 
> Question on CONSTRUCTOR ordering.   If you have libraries that you are 
> creating which contain constructors, but nothing in that .INF 
> [LibraryClasses] section then does that mean that routine can't rely on 
> something else being constructed before it?  I would guess it would then be 
> up to the applications [libraryclasses] order?  But really, if your library 
> routine requires support from something, especially 
> "UefiBootServicesTableLib", then you should include that in the .inf 
> [LibraryClasses] section for that library routine.  Correct?   And if you 
> included something like UefiApplicationEntryPoint instead, that would still 
> be okay,because that library has the UefiBootServicesTableLib in its 
> [LibraryClasses] section?
> 
> TIA!!
> 
> 
> ------------------------------------------------------------------------------
> How ServiceNow helps IT people transform IT departments:
> 1. Consolidate legacy IT systems to a single system of record for IT
> 2. Standardize and globalize service processes across IT
> 3. Implement zero-touch automation to replace manual, redundant tasks
> http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk_______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to