[PATCH v2 05/13] aarch64: Add BTI landing pads to assembly code

Szabolcs Nagy szabolcs.nagy@arm.com
Tue May 12 11:35:31 GMT 2020


The 05/12/2020 12:27, Andreas Schwab wrote:
> On Mai 12 2020, Szabolcs Nagy wrote:
> 
> > diff --git a/sysdeps/aarch64/sysdep.h b/sysdeps/aarch64/sysdep.h
> > index 604c489170..161d63c782 100644
> > --- a/sysdeps/aarch64/sysdep.h
> > +++ b/sysdeps/aarch64/sysdep.h
> > @@ -41,12 +41,40 @@
> >  
> >  #define ASM_SIZE_DIRECTIVE(name) .size name,.-name
> >  
> > +/* Branch Target Identitication support.  */
> > +#define BTI_C		hint	34
> > +#define BTI_J		hint	36
> > +
> > +#define FEATURE_1_BTI 1
> > +#define FEATURE_1_PAC 2
> > +
> > +/* Add a GNU_PROPERTY_AARCH64_FEATURE_1_AND note.  */
> > +#define GNU_PROPERTY(features)		\
> > +  .section .note.gnu.property, "a";	\
> > +  .p2align 3;				\
> > +  .word 4;				\
> > +  .word 16;				\
> > +  .word 5;				\
> > +  .asciz "GNU";				\
> > +  .word 0xc0000000;			\
> 
> Is that GNU_PROPERTY_AARCH64_FEATURE_1_AND?

yes, but i cannot include elf.h in asm code.
(and i didnt like the long name, but since
Adhemerval asked the same maybe i should
add a comment)


More information about the Libc-alpha mailing list