edk2 app size


Roman Bacik
 

We have created bnxtmt.efi app running in edk2 shell. It builds and runs
ok when created with NOOPT and DEBUG options. But it fails to link when
using RELEASE option.
The errors we see:

...
/local/ldk/netxtreme/main/Cumulus/util/bnxt-mt/src/bnxtmt/tcl/dos/tclAppIn
it.c:224:(.text.Tcl_AppInit+0x50): relocation truncated to fit:
R_AARCH64_ADR_PREL_LO21 against `.rodata.str1.1'
bnxtmt.dll.ltrans0.ltrans.o: In function `init_efi':
/local/ldk/netxtreme/main/Cumulus/util/bnxt-mt/src/bnxtmt/os_util/uefi/os_
uefi.c:363:(.text.Tcl_AppInit+0x60): relocation truncated to fit:
R_AARCH64_ADR_PREL_LO21 against symbol `NX2_BootServices' defined in
.bss.NX2_BootServices section in bnxtmt.dll.ltrans22.ltrans.o
bnxtmt.dll.ltrans0.ltrans.o: In function `tcl_al_diag_init':
/local/ldk/netxtreme/main/Cumulus/util/bnxt-mt/src/common/tcl_al/tcl_al.c:
367:(.text.Tcl_AppInit+0x68): relocation truncated to fit:
R_AARCH64_ADR_PREL_LO21 against `.rodata.str1.1'
bnxtmt.dll.ltrans0.ltrans.o: In function `dg_get_no_pci_flag':
/local/ldk/netxtreme/main/Cumulus/util/bnxt-mt/src/common/diag_manager/dg_
init.c:231:(.text.Tcl_AppInit+0x78): relocation truncated to fit:
R_AARCH64_ADR_PREL_LO21 against symbol `no_pci_flag.lto_priv.844' defined
in .bss.no_pci_flag.lto_priv.844 section in bnxtmt.dll.ltrans9.ltrans.o
bnxtmt.dll.ltrans0.ltrans.o: In function `console_init':
/local/ldk/netxtreme/main/Cumulus/util/bnxt-mt/src/common/util/debug.c:64:
(.text.Tcl_AppInit+0x88): relocation truncated to fit:
R_AARCH64_ADR_PREL_LO21 against `.bss.console_buffer.lto_priv.1155'
...

Do you have any suggestions on how to fix it?
Thanks,

Roman

--
This electronic communication and the information and any files transmitted
with it, or attached to it, are confidential and are intended solely for
the use of the individual or entity to whom it is addressed and may contain
information that is confidential, legally privileged, protected by privacy
laws, or otherwise restricted from disclosure to anyone else. If you are
not the intended recipient or the person responsible for delivering the
e-mail to the intended recipient, you are hereby notified that any use,
copying, distributing, dissemination, forwarding, printing, or copying of
this e-mail is strictly prohibited. If you received this e-mail in error,
please return the e-mail to the sender, delete it from your computer, and
destroy any printed copy of it.