]> git.proxmox.com Git - mirror_edk2.git/commitdiff
make change to support UnixPkg build. The changes are listed as follows:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 30 Jun 2008 05:50:49 +0000 (05:50 +0000)
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 30 Jun 2008 05:50:49 +0000 (05:50 +0000)
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

BaseTools/Conf/tools_def.template
MdeModulePkg/Core/DxeIplPeim/Ia32/IdtVectorAsm.S
MdePkg/Include/Ia32/ProcessorBind.h

index 7cbffbfcb10fa234e30cba48f138b635ead70d10..1b2e44c85f77e121afa3ea781aa7352902a075f2 100644 (file)
@@ -500,10 +500,12 @@ RELEASE_WINDDK3790x1830_IPF_DLINK_FLAGS  = /NOLOGO /NODEFAULTLIB /LTCG /DLL /OPT
 *_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
index ee02a4104b09d6b40b0eeea76d77d5b71b9695cb..a152b5033ce604e9d3dfb60e9be8cfe6911a2f49 100644 (file)
 ;\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
@@ -72,8 +72,8 @@ ASM_PFX(AsmVectorFixup):
 \r
 CommonInterruptEntry: \r
         cli\r
-@@:\r
-        jmp   @@\r
+1:\r
+        jmp   1b\r
 \r
 \r
 \r
index 45e9c14bf345701fb5566fdd990c24f2ab987d23..72c10328e45a07e54b00650d209a82271cfb5a1c 100644 (file)
@@ -197,7 +197,11 @@ typedef INT32   INTN;
 // 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