Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
3b83c957
Unverified
Commit
3b83c957
authored
Nov 27, 2018
by
Antonio Niño Díaz
Committed by
GitHub
Nov 27, 2018
Browse files
Merge pull request #1695 from satheesbalya-arm/sb1/sb1_2641_romlib_phase2
romlib: Allow patching of romlib functions
parents
85397ec4
582133a8
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/romlib/Makefile
View file @
3b83c957
...
...
@@ -15,6 +15,7 @@ LIBS = -lmbedtls -lfdt -lc
INC
=
$
(
INCLUDES:-I%
=
-I
../../%
)
PPFLAGS
=
$(INC)
$(DEFINES)
-P
-D__ASSEMBLY__
-D__LINKER__
-MD
-MP
-MT
$(BUILD_DIR)
/romlib.ld
OBJS
=
$(BUILD_DIR)
/jmptbl.o
$(BUILD_DIR)
/init.o
MAPFILE
=
../../
$(BUILD_PLAT)
/romlib/romlib.map
V
?=
0
ifeq
($(V),0)
...
...
@@ -25,7 +26,7 @@ endif
ifeq
($(DEBUG),1)
CFLAGS
:=
-g
LDFLAGS
:=
-g
LDFLAGS
:=
-g
--gc-sections
-O1
-Map
=
$(MAPFILE)
endif
...
...
lib/romlib/genwrappers.sh
View file @
3b83c957
...
...
@@ -31,7 +31,7 @@ do
done
awk
'{sub(/[:blank:]*#.*/,"")}
!/^$/ {print $1*4, $2, $3}'
"
$@
"
|
!/^$/
&& !/\\tpatch$/
{print $1*4, $2, $3}'
"
$@
"
|
while
read
idx lib sym
do
file
=
$build
/
${
lib
}
_
$sym
...
...
lib/romlib/jmptbl.i
View file @
3b83c957
...
...
@@ -3,6 +3,10 @@
#
#
SPDX-License-Identifier
:
BSD-3-Clause
#
#
Format
:
#
index
lib
function
[
patch
]
#
Add
"patch"
at
the
end
of
the
line
to
patch
a
function
.
For
example
:
#
14
mbedtls
mbedtls_memory_buffer_alloc_init
patch
0
rom
rom_lib_init
1
fdt
fdt_getprop_namelen
...
...
@@ -27,9 +31,10 @@
20
mbedtls
mbedtls_pk_init
21
mbedtls
mbedtls_pk_parse_subpubkey
22
mbedtls
mbedtls_pk_verify_ext
23
mbedtls
mbedtls_platform_set_snprintf
24
mbedtls
mbedtls_x509_get_rsassa_pss_params
25
mbedtls
mbedtls_x509_get_sig_alg
26
mbedtls
mbedtls_md_info_from_type
27
c
exit
28
c
atexit
23
mbedtls
mbedtls_platform_set_calloc_free
24
mbedtls
mbedtls_platform_set_snprintf
25
mbedtls
mbedtls_x509_get_rsassa_pss_params
26
mbedtls
mbedtls_x509_get_sig_alg
27
mbedtls
mbedtls_md_info_from_type
28
c
exit
29
c
atexit
\ No newline at end of file
make_helpers/build_macros.mk
View file @
3b83c957
...
...
@@ -338,7 +338,7 @@ LDPATHS = -L${LIB_DIR}
LDLIBS
+=
-l
$(1)
ifeq
($(USE_ROMLIB),1)
LD
LIB
S
:
=
-lwrappers
-lc
LIB
WRAPPER
=
-lwrappers
endif
all
:
${LIB_DIR}/lib$(1).a
...
...
@@ -402,7 +402,7 @@ else
endif
$
$(Q)
$
$(LD)
-o
$$
@
$
$(TF_LDFLAGS)
$
$(LDFLAGS)
-Map
=
$(MAPFILE)
\
--script
$(LINKERFILE)
$(BUILD_DIR)
/build_message.o
\
$(OBJS)
$(LDPATHS)
$(LDLIBS)
$(BL_LIBS)
$(OBJS)
$(LDPATHS)
$(LIBWRAPPER)
$(LDLIBS)
$(BL_LIBS)
$(DUMP)
:
$(ELF)
$
${ECHO}
" OD
$$
@"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment