From 1f65ed53da16e383416ae034b585fd52682f5ea7 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Sun, 13 Mar 2016 11:09:01 +0000 Subject: [build] Allow assembler section type character to vary by architecture On some architectures (such as ARM) the "@" character is used as a comment delimiter. A section type argument such as "@progbits" therefore becomes "%progbits". This is further complicated by the fact that the "%" character has special meaning for inline assembly when input or output operands are used, in which cases "@progbits" becomes "%%progbits". Allow the section type character(s) to be defined via Makefile variables. Signed-off-by: Michael Brown --- src/crypto/certstore.c | 2 +- src/crypto/privkey.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crypto') diff --git a/src/crypto/certstore.c b/src/crypto/certstore.c index 503ce499..e62d8330 100644 --- a/src/crypto/certstore.c +++ b/src/crypto/certstore.c @@ -45,7 +45,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); #define CERT( _index, _path ) \ extern char stored_cert_ ## _index ## _data[]; \ extern char stored_cert_ ## _index ## _len[]; \ - __asm__ ( ".section \".rodata\", \"a\", @progbits\n\t" \ + __asm__ ( ".section \".rodata\", \"a\", " PROGBITS "\n\t" \ "\nstored_cert_" #_index "_data:\n\t" \ ".incbin \"" _path "\"\n\t" \ "\nstored_cert_" #_index "_end:\n\t" \ diff --git a/src/crypto/privkey.c b/src/crypto/privkey.c index a6043bd1..0b10e9cf 100644 --- a/src/crypto/privkey.c +++ b/src/crypto/privkey.c @@ -54,7 +54,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); /* Raw private key data */ extern char private_key_data[]; extern char private_key_len[]; -__asm__ ( ".section \".rodata\", \"a\", @progbits\n\t" +__asm__ ( ".section \".rodata\", \"a\", " PROGBITS "\n\t" "\nprivate_key_data:\n\t" #ifdef PRIVATE_KEY ".incbin \"" PRIVATE_KEY "\"\n\t" -- cgit v1.2.3-55-g7522