For testing we need to build some ELF files containing binman symbols. Add these to the Makefile and check in the binaries: u_boot_binman_syms - normal, valid ELF file u_boot_binman_syms_bad - missing the __image_copy_start symbol u_boot_binman_syms_size - has a binman symbol with an invalid size Signed-off-by: Simon Glass <sjg@chromium.org>master
parent
00ae40b3ae
commit
5cfcf7e0fd
Binary file not shown.
@ -0,0 +1,14 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (c) 2017 Google, Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
* |
||||||
|
* Simple program to create some binman symbols. This is used by binman tests. |
||||||
|
*/ |
||||||
|
|
||||||
|
#define CONFIG_BINMAN |
||||||
|
#include <binman_sym.h> |
||||||
|
|
||||||
|
binman_sym_declare(unsigned long, u_boot_spl, pos); |
||||||
|
binman_sym_declare(unsigned long long, u_boot_spl2, pos); |
||||||
|
binman_sym_declare(unsigned long, u_boot_any, pos); |
@ -0,0 +1,30 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2016 Google, Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
*/ |
||||||
|
|
||||||
|
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
||||||
|
OUTPUT_ARCH(i386) |
||||||
|
ENTRY(_start) |
||||||
|
|
||||||
|
SECTIONS |
||||||
|
{ |
||||||
|
. = 0x00000000; |
||||||
|
_start = .; |
||||||
|
|
||||||
|
. = ALIGN(4); |
||||||
|
.text : |
||||||
|
{ |
||||||
|
__image_copy_start = .; |
||||||
|
*(.text*) |
||||||
|
} |
||||||
|
|
||||||
|
. = ALIGN(4); |
||||||
|
.binman_sym_table : { |
||||||
|
__binman_sym_start = .; |
||||||
|
KEEP(*(SORT(.binman_sym*))); |
||||||
|
__binman_sym_end = .; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Binary file not shown.
@ -0,0 +1 @@ |
|||||||
|
u_boot_binman_syms.c |
@ -0,0 +1,29 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2016 Google, Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
*/ |
||||||
|
|
||||||
|
OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") |
||||||
|
OUTPUT_ARCH(i386) |
||||||
|
ENTRY(_start) |
||||||
|
|
||||||
|
SECTIONS |
||||||
|
{ |
||||||
|
. = 0x00000000; |
||||||
|
_start = .; |
||||||
|
|
||||||
|
. = ALIGN(4); |
||||||
|
.text : |
||||||
|
{ |
||||||
|
*(.text*) |
||||||
|
} |
||||||
|
|
||||||
|
. = ALIGN(4); |
||||||
|
.binman_sym_table : { |
||||||
|
__binman_sym_start = .; |
||||||
|
KEEP(*(SORT(.binman_sym*))); |
||||||
|
__binman_sym_end = .; |
||||||
|
} |
||||||
|
|
||||||
|
} |
Binary file not shown.
@ -0,0 +1,12 @@ |
|||||||
|
/*
|
||||||
|
* Copyright (c) 2017 Google, Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: GPL-2.0+ |
||||||
|
* |
||||||
|
* Simple program to create some binman symbols. This is used by binman tests. |
||||||
|
*/ |
||||||
|
|
||||||
|
#define CONFIG_BINMAN |
||||||
|
#include <binman_sym.h> |
||||||
|
|
||||||
|
binman_sym_declare(char, u_boot_spl, pos); |
Loading…
Reference in new issue