diff options
author | Dimitris Papastamos <dimitris.papastamos@arm.com> | 2019-03-21 12:40:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-21 12:40:35 +0000 |
commit | 46d58f80afc994f522db4340270f1bcbb0c56fb1 (patch) | |
tree | 0d3e50265b2c2475716550b34c91892709c27a77 /lib | |
parent | cc0dcf428f047454d96461aa06327cfb528e7270 (diff) | |
parent | ae2e01b8760618c374a605dbe4898945595cb136 (diff) |
Merge pull request #1902 from jts-arm/romlib
ROMLIB bug fixes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/romlib/Makefile | 15 | ||||
-rwxr-xr-x | lib/romlib/genwrappers.sh | 6 |
2 files changed, 9 insertions, 12 deletions
diff --git a/lib/romlib/Makefile b/lib/romlib/Makefile index 0e5d4475..12fdfa8e 100644 --- a/lib/romlib/Makefile +++ b/lib/romlib/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -58,18 +58,15 @@ $(WRAPPER_DIR)/jmpvar.s: $(BUILD_DIR)/romlib.elf @echo " VAR $@" $(Q)./genvar.sh -o $@ $(BUILD_DIR)/romlib.elf -$(LIB_DIR)/libwrappers.a: jmptbl.i $(WRAPPER_DIR)/jmpvar.o +$(LIB_DIR)/libwrappers.a: $(BUILD_DIR)/jmptbl.i $(WRAPPER_DIR)/jmpvar.o @echo " AR $@" $(Q)./genwrappers.sh -b $(WRAPPER_DIR) -o $@ $(BUILD_DIR)/jmptbl.i -$(BUILD_DIR)/jmptbl.s: jmptbl.i +$(BUILD_DIR)/jmptbl.i: $(BUILD_DIR)/jmptbl.s + +$(BUILD_DIR)/jmptbl.s: ../../$(PLAT_DIR)/jmptbl.i @echo " TBL $@" - if [ -e "../../$(PLAT_DIR)/jmptbl.i" ] ; \ - then \ - $(Q)./gentbl.sh -o $@ -b $(BUILD_DIR) ../../$(PLAT_DIR)/jmptbl.i; \ - else \ - @echo "USE_ROMLIB=1 requires jump table list file: jmptbl.i in platform directory"; \ - fi + $(Q)./gentbl.sh -o $@ -b $(BUILD_DIR) ../../$(PLAT_DIR)/jmptbl.i clean: @rm -f $(BUILD_DIR)/* diff --git a/lib/romlib/genwrappers.sh b/lib/romlib/genwrappers.sh index 746e4ba9..07d59ac4 100755 --- a/lib/romlib/genwrappers.sh +++ b/lib/romlib/genwrappers.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. +# Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause @@ -31,7 +31,7 @@ do done awk '{sub(/[:blank:]*#.*/,"")} -!/^$/ && !/\\tpatch$/ !/\\treserved$/ {print $1*4, $2, $3}' "$@" | +!/^$/ && $NF != "patch" && $NF != "reserved" {print $1*4, $2, $3}' "$@" | while read idx lib sym do file=$build/${lib}_$sym @@ -41,7 +41,7 @@ do $sym: ldr x17, =jmptbl ldr x17, [x17] - mov x16, $idx + mov x16, #$idx add x16, x16, x17 br x16 EOF |