tpm2: Add GlobalStateCleanup function
The GlobalStateCleanup will cleanup all global and static variables that
should be initialize with zero. (The .bss section data.)
After replace the memset of __bss_libtpm2 in tpm_register with this
function and remove the nolto-rel in cr50 build.mk. We will have 9k more
flash space on cr50.
BUG=b:295214006
TEST=CQ
Cq-Depend: chromium:4812599
Change-Id: Iaef13035971325cb914147b3ac42949b4d0c6468
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/tpm2/+/4813118
Commit-Queue: Yi Chou <yich@google.com>
Tested-by: Yi Chou <yich@google.com>
Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
4 files changed