1. change ASM_PFX() macro, the underscore preceding to function symbol don't be added in Linux.
2. move some illegal characters in .S file.
3. change ELFGCC flag in tools_def.template to support Linux&ELFGCC build
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5381
6f19259b-4bc3-4df7-8a09-
765794883524
*_ELFGCC_IA32_ASM_PATH = DEF(ELFGCC_BIN)/gcc\r
*_ELFGCC_IA32_PP_PATH = DEF(ELFGCC_BIN)/gcc\r
*_ELFGCC_IA32_VFRPP_PATH = DEF(ELFGCC_BIN)/gcc\r
+*_ELFGCC_*_MAKE_PATH = make\r
\r
+*_ELFGCC_*_MAKE_FLAGS = -i\r
*_ELFGCC_IA32_CC_FLAGS = -m32 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings\r
*_ELFGCC_*_DLINK_FLAGS = -melf_i386 -nostdlib -n -q -Ttext 0x220 --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT)\r
-*_ELFGCC_*_ASM_FLAGS = -m32 -c -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
+*_ELFGCC_*_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h\r
*_ELFGCC_*_PP_FLAGS = -m32 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h\r
*_ELFGCC_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include AutoGen.h\r
\r
;\r
;-----------------------------------------------------------------------\r
*/\r
-@VectorTemplateBase:\r
+VectorTemplateBase:\r
pushl %eax\r
.byte 0x6a # push #VectorNum\r
-@VectorNum:\r
+VectorNum:\r
.byte 0\r
movl CommonInterruptEntry, %eax\r
jmp *%eax\r
-@VectorTemplateEnd:\r
+VectorTemplateEnd:\r
\r
\r
ASM_PFX(AsmGetVectorTemplatInfo):\r
movl 4(%esp), %ecx\r
- movl $@VectorTemplateBase, (%ecx)\r
- movl $(@VectorTemplateEnd - @VectorTemplateBase), %eax\r
+ movl $VectorTemplateBase, (%ecx)\r
+ movl $(VectorTemplateEnd - VectorTemplateBase), %eax\r
ret\r
\r
ASM_PFX(AsmVectorFixup):\r
movl 8(%esp), %eax\r
movl 4(%esp), %ecx\r
- movb %al, (@VectorNum - @VectorTemplateBase)(%ecx)\r
+ movb %al, (VectorNum - VectorTemplateBase)(%ecx)\r
ret\r
\r
/*\r
\r
CommonInterruptEntry: \r
cli\r
-@@:\r
- jmp @@\r
+1:\r
+ jmp 1b\r
\r
\r
\r
// For symbol name in GNU assembly code, an extra "_" is necessary\r
//\r
#if __GNUC__\r
- #define ASM_PFX(name) _##name \r
+ #if defined(linux)\r
+ #define ASM_PFX(name) name\r
+ #else\r
+ #define ASM_PFX(name) _##name\r
+ #endif \r
#endif\r
\r
#define FUNCTION_ENTRY_POINT(p) (p)\r