diff options
author | Sudakshina Das <sudi.das@arm.com> | 2020-03-17 15:44:18 +0000 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2020-06-12 14:34:39 +0100 |
commit | f440d0a804e5e6e6dbc46aee66afb206d88389e8 (patch) | |
tree | a838668dacf8f15b3bbcb92ca9948bb470cd8594 /iconv/gconv_cache.c | |
parent | 088a606441f624221ce9be2038b71ca908f40c42 (diff) | |
download | glibc-f440d0a804e5e6e6dbc46aee66afb206d88389e8.tar.gz glibc-f440d0a804e5e6e6dbc46aee66afb206d88389e8.tar.xz glibc-f440d0a804e5e6e6dbc46aee66afb206d88389e8.zip |
aarch64: Add BTI support to assembly files
To enable building glibc with branch protection, assembly code needs BTI landing pads and ELF object file markings in the form of a GNU property note. The landing pads are unconditionally added to all functions that may be indirectly called. When the code segment is not mapped with PROT_BTI these instructions are nops. They are kept in the code when BTI is not supported so that the layout of performance critical code is unchanged across configurations. The GNU property notes are only added when there is support for BTI in the toolchain, because old binutils does not handle the notes right. (Does not know how to merge them nor to put them in PT_GNU_PROPERTY segment instead of PT_NOTE, and some versions of binutils emit warnings about the unknown GNU property. In such cases the produced libc binaries would not have valid ELF marking so BTI would not be enabled.) Note: functions using ENTRY or ENTRY_ALIGN now start with an additional BTI c, so alignment of the following code changes, but ENTRY_ALIGN_AND_PAD was fixed so there is no change to the existing code layout. Some string functions may need to be tuned for optimal performance after this commit. Co-authored-by: Szabolcs Nagy <szabolcs.nagy@arm.com> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Diffstat (limited to 'iconv/gconv_cache.c')
0 files changed, 0 insertions, 0 deletions