aarch64: Add ELF support
BUG=None BRANCH=none TEST=Build coreboot Signed-off-by: Marcelo Povoa <marcelogp@chromium.org> Change-Id: I38684794fdf5bd95a32f157128434a13f5e2a2d5 Reviewed-on: https://chromium-review.googlesource.com/185271 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: David Hendricks <dhendrix@chromium.org> Tested-by: Marcelo Póvoa <marcelogp@chromium.org> Commit-Queue: Marcelo Póvoa <marcelogp@chromium.org>
This commit is contained in:
parent
947c7f1cb9
commit
67b74d3dc9
2 changed files with 3 additions and 0 deletions
|
|
@ -244,6 +244,8 @@ typedef struct
|
|||
#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
|
||||
#define EM_NUM 95
|
||||
|
||||
#define EM_AARCH64 183 /* ARM Aarch64 Architecture */
|
||||
|
||||
/* If it is necessary to assign new unofficial EM_* values, please
|
||||
pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
|
||||
chances of collision with official or non-GNU unofficial values. */
|
||||
|
|
|
|||
|
|
@ -273,6 +273,7 @@ elf_headers(const struct buffer *pinput,
|
|||
|
||||
// The tool may work in architecture-independent way.
|
||||
if (arch != CBFS_ARCHITECTURE_UNKNOWN &&
|
||||
!((ehdr->e_machine == EM_AARCH64) && (arch == CBFS_ARCHITECTURE_AARCH64)) &&
|
||||
!((ehdr->e_machine == EM_ARM) && (arch == CBFS_ARCHITECTURE_ARM)) &&
|
||||
!((ehdr->e_machine == EM_386) && (arch == CBFS_ARCHITECTURE_X86))) {
|
||||
ERROR("The stage file has the wrong architecture\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue