diff options
author | Tom Hughes <tomhughes@chromium.org> | 2021-10-27 20:38:19 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-28 21:21:35 +0000 |
commit | c5cb1cd10c416e4a17726033dcea63e8de4b5626 (patch) | |
tree | b11e90182c45fd483c58dbf5eb233aa2a7f7b5f9 /common/firmware_image.S | |
parent | a825aa2a66065de6049288de71dcc898cfb0fd27 (diff) | |
download | chrome-ec-c5cb1cd10c416e4a17726033dcea63e8de4b5626.tar.gz |
common/firmware_image: Add _start symbol
When linking with clang (lld), it complains that it can't find the
"_start" symbol:
ld.lld: warning: cannot find entry symbol _start; defaulting to
0x8000000
"_start" is used by the linker to fill in the entry point address in the
ELF header ("e_entry":
https://refspecs.linuxbase.org/elf/elf.pdf#page=19):
arm-none-eabi-readelf -e ./build/servo_micro/ec.obj
ELF Header:
...
Entry point address: 0x8000000
...
Add an explicit "_start" symbol at the beginning of the firmware image
(entry point) to satisfy the linker.
BRANCH=none
BUG=b:172020503
TEST=./util/compare_build.sh -b all -j 120
=> MATCH
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Id077013cb54869b92d18cea2f74be25135bc4e42
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3249156
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'common/firmware_image.S')
-rw-r--r-- | common/firmware_image.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/firmware_image.S b/common/firmware_image.S index 5c70d29069..193719608f 100644 --- a/common/firmware_image.S +++ b/common/firmware_image.S @@ -21,6 +21,9 @@ #define FW_IMAGE_SIGN(sect,suffix) \ STRINGIFY(FW_FILE(FINAL_OUTDIR,PROJECT,sect,suffix,.sig)) +.global _start +_start: + /* Read Only firmware */ #ifdef CONFIG_FW_INCLUDE_RO .section .image.RO, "ax" |