diff options
author | Kévin Petit <kevin.petit@arm.com> | 2015-03-24 14:03:57 +0000 |
---|---|---|
committer | Kévin Petit <kevin.petit@arm.com> | 2015-04-08 13:02:59 +0100 |
commit | 8b779620d3bad024b83650ecfeaafd7b3ae26ccf (patch) | |
tree | 345141826138671577efda8e8b8426dd3f039916 /include/common/asm_macros.S | |
parent | cd319142464907e3760129f3e245a325300eb3c3 (diff) | |
download | platform_external_arm-trusted-firmware-8b779620d3bad024b83650ecfeaafd7b3ae26ccf.tar.gz platform_external_arm-trusted-firmware-8b779620d3bad024b83650ecfeaafd7b3ae26ccf.tar.bz2 platform_external_arm-trusted-firmware-8b779620d3bad024b83650ecfeaafd7b3ae26ccf.zip |
Add support to indicate size and end of assembly functions
In order for the symbol table in the ELF file to contain the size of
functions written in assembly, it is necessary to report it to the
assembler using the .size directive.
To fulfil the above requirements, this patch introduces an 'endfunc'
macro which contains the .endfunc and .size directives. It also adds
a .func directive to the 'func' assembler macro.
The .func/.endfunc have been used so the assembler can fail if
endfunc is omitted.
Fixes ARM-Software/tf-issues#295
Change-Id: If8cb331b03d7f38fe7e3694d4de26f1075b278fc
Signed-off-by: Kévin Petit <kevin.petit@arm.com>
Diffstat (limited to 'include/common/asm_macros.S')
-rw-r--r-- | include/common/asm_macros.S | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/common/asm_macros.S b/include/common/asm_macros.S index 238fa82a8..4dcb5f0cc 100644 --- a/include/common/asm_macros.S +++ b/include/common/asm_macros.S @@ -85,9 +85,18 @@ .macro func _name .section .text.\_name, "ax" .type \_name, %function + .func \_name \_name: .endm + /* + * This macro is used to mark the end of a function. + */ + .macro endfunc _name + .endfunc + .size \_name, . - \_name + .endm + /* --------------------------------------------- * Find the type of reset and jump to handler * if present. If the handler is null then it is |