On 07/15/15 15:40, Andrew Fish wrote: > >> On Jul 15, 2015, at 2:55 AM, Laszlo Ersek <ler...@redhat.com >> <mailto:ler...@redhat.com>> wrote: >> >> On 07/14/15 23:49, Andrew Fish wrote: >>> >>>> On Jul 14, 2015, at 2:21 PM, Laszlo Ersek <ler...@redhat.com >>>> <mailto:ler...@redhat.com> >>>> <mailto:ler...@redhat.com>> wrote: >>>> >>>> On 07/14/15 20:31, S.Vieira wrote: >>>>> Hi everyone. >>>>> >>>>> It's possible to do upload of two drives just in ONE .efi >>>>> >>>>> I am wanting to do upload of the AtaAtapiPassThruDxe and AtaBusDxe >>>>> only in >>>>> ONE file. >>>> >>>> I think it should be possible to install any number of driver binding >>>> protocol instances in a single driver module, on the image handle. >>>> However, you'd have to merge the two drivers into one in C source code, >>>> and then build the resultant driver. >>>> >>> >>> You could also convert one of the drivers to a NULL library (change the >>> INF file), and add that new NULL library to the DSC statement for the >>> other driver. >> >> Independently of the thread starter question -- I've never quite gotten >> a clear image of NULL libraries. How do they work? >> > > It is not really that complicated. It is just a way to force the build > system to call the libraries constructor/destructor. > > If you add a NULL library to the LibraryClasses section of a DSC that > that library gets linked against all drivers. This is not common, but it > is useful for a library that produces compiler intrinsics. > > If you list a NULL library in the <LibraryClasses> of a component > section in the DSC then that library gets added. A good example of this > is it is a way to add optional shell commands. The library constructor > will call another library function to register shell commands. > > Normally you just get the libraries the driver/application depends on > (listed in the INF, mapped in the DSC), and the libraries the libraries > depend on, etc.
How cool is that. edk2 has a substitute for "__attribute__((constructor))". :) Thank you for the clear explanation! Laszlo ------------------------------------------------------------------------------ Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel