[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>
This commit is contained in:
Michael Brown
2016-03-13 11:09:01 +00:00
parent a8037ee131
commit 1f65ed53da
7 changed files with 29 additions and 8 deletions

View File

@@ -258,7 +258,7 @@ static inline void eplatform_discard ( int dummy __unused, ... ) {}
* @ret error Error
*/
#define __einfo_error( einfo ) ( { \
__asm__ ( ".section \".einfo\", \"\", @progbits\n\t" \
__asm__ ( ".section \".einfo\", \"\", " PROGBITS_OPS "\n\t" \
".align 8\n\t" \
"\n1:\n\t" \
".long ( 4f - 1b )\n\t" \