summaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorMichael Brown2016-03-13 12:09:01 +0100
committerMichael Brown2016-03-13 12:20:53 +0100
commit1f65ed53da16e383416ae034b585fd52682f5ea7 (patch)
tree3503be882258c7f371875fbb9dde567f72649fff /src/crypto
parent[efi] Centralise architecture-independent EFI Makefile and linker script (diff)
downloadipxe-1f65ed53da16e383416ae034b585fd52682f5ea7.tar.gz
ipxe-1f65ed53da16e383416ae034b585fd52682f5ea7.tar.xz
ipxe-1f65ed53da16e383416ae034b585fd52682f5ea7.zip
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/certstore.c2
-rw-r--r--src/crypto/privkey.c2
2 files changed, 2 insertions, 2 deletions
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"