Revision: 19303
          http://sourceforge.net/p/edk2/code/19303
Author:   abiesheuvel
Date:     2015-12-16 12:57:14 +0000 (Wed, 16 Dec 2015)
Log Message:
-----------
ArmPkg: rewrite vector table population macros

Unfortunately, Clang does not support the use of symbol references in .org
directives, and bails with the following error message when it encounters
them:

  <...>:error: expected assembly-time absolute expression
  .org DebugAgentVectorTable + 0x000

So replace the .org arguments with absolute values, and move the whole
vector table into a subsection with the appropriate alignment, and
starting at .org 0x0. This gives the same protection with respect to
entries that exceed 128 bytes, in a way that Clang supports as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
Acked-by: Mark Rutland <mark.rutl...@arm.com>
Reviewed-by: Leif Lindholm <leif.lindh...@linaro.org>

Modified Paths:
--------------
    trunk/edk2/ArmPkg/Include/Chipset/AArch64.h

Modified: trunk/edk2/ArmPkg/Include/Chipset/AArch64.h
===================================================================
--- trunk/edk2/ArmPkg/Include/Chipset/AArch64.h 2015-12-16 11:54:50 UTC (rev 
19302)
+++ trunk/edk2/ArmPkg/Include/Chipset/AArch64.h 2015-12-16 12:57:14 UTC (rev 
19303)
@@ -119,15 +119,18 @@
 #define ARM_VECTOR_LOW_A32_SERR 0x780
 
 #define VECTOR_BASE(tbl)          \
+  .section .text.##tbl##,"ax";    \
   .align 11;                      \
+  .org 0x0;                       \
   GCC_ASM_EXPORT(tbl);            \
   ASM_PFX(tbl):                   \
 
 #define VECTOR_ENTRY(tbl, off)    \
-  .org ASM_PFX(tbl) + off
+  .org off
 
 #define VECTOR_END(tbl)           \
-  .org ASM_PFX(tbl) + 0x800
+  .org 0x800;                     \
+  .previous
 
 VOID
 EFIAPI


------------------------------------------------------------------------------
_______________________________________________
edk2-commits mailing list
edk2-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to