gbl: enable EFI code unit tests

Restructures the EFI application code to allow unittesting.

Previously, bringing in libefi would unconditionally install the global
allocation hooks, which would cause the host-side unittests to panic
immediately when they attempted to allocate during initialization.

This CL restructures the code so that it's up the library user to
install the global hooks. There's a bit of awkwardness with requiring an
external global variable, but a more comprehensive solution has proven
to be very difficult, and we only really expect libefi to have this
single user anyway so it doesn't need to be super generalizable.

We also refactor the EFI application into a library containing most of
the code, plus a very small shim for the application entry point. This
allows the test code to target the host, since otherwise it would
attempt to drag in the device-side dependencies which breaks compilation.

Bug: b/355436086
Change-Id: I6aa658e5c509cfc54d8b4fcdd5af256d6ee1c055
9 files changed
tree: 13f76f892a02e3bb209616daa53e64513093e93c
  1. gbl/
  2. libxbc/
  3. vts/
  4. .clang-format
  5. .gitignore
  6. BUILD
  7. LICENSE
  8. OWNERS