]> git.proxmox.com Git - mirror_edk2.git/commit - BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/GenFw: Enhance error message for bad symbol definitions
authorMichael LeMay <michael.lemay@intel.com>
Fri, 29 Jan 2016 04:17:13 +0000 (12:17 +0800)
committerYonghong Zhu <yonghong.zhu@intel.com>
Wed, 17 Feb 2016 05:21:44 +0000 (13:21 +0800)
commit621bb723a4e00cb93e8a94c6126de4976dde1d9e
treeab998c2dbd40ce7a90d31f9ed14c07f263048ffe
parent17751c5fa473fd4f830007590d59e8d15a2d2935
BaseTools/GenFw: Enhance error message for bad symbol definitions

This patch expands the error message that is output when GenFw
encounters a bad symbol definition or an unsupported symbol type.  It
displays the symbol name, the symbol address, and a message that
describes both possibilities (bad symbol definition or unsupported
symbol type).  It also provides two examples of unsupported symbol
types.

Furthermore, this patch revises the conditional for detecting bad
symbol definitions to eliminate a redundant test (a Sym->st_shndx
value of SHN_ABS should certainly be greater than mEhdr->e_shnum) and
to change another test from 'Sym->st_shndx > mEhdr->e_shnum' to
'Sym->st_shndx >= mEhdr->e_shnum' for consistency with the test in
GetShdrByIndex.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael LeMay <michael.lemay@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
BaseTools/Source/C/GenFw/Elf32Convert.c
BaseTools/Source/C/GenFw/Elf64Convert.c
BaseTools/Source/C/GenFw/ElfConvert.h