]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg: rewrite vector table population macros
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 16 Dec 2015 12:57:14 +0000 (12:57 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Wed, 16 Dec 2015 12:57:14 +0000 (12:57 +0000)
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.biesheuvel@linaro.org>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19303 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Include/Chipset/AArch64.h

index 5e1653bcb69d987d5aab026521b573b1bdafa75f..e53605f641fe2466d762e322e37a03d6eb698b6c 100644 (file)
 #define ARM_VECTOR_LOW_A32_SERR 0x780\r
 \r
 #define VECTOR_BASE(tbl)          \\r
+  .section .text.##tbl##,"ax";    \\r
   .align 11;                      \\r
+  .org 0x0;                       \\r
   GCC_ASM_EXPORT(tbl);            \\r
   ASM_PFX(tbl):                   \\r
 \r
 #define VECTOR_ENTRY(tbl, off)    \\r
-  .org ASM_PFX(tbl) + off\r
+  .org off\r
 \r
 #define VECTOR_END(tbl)           \\r
-  .org ASM_PFX(tbl) + 0x800\r
+  .org 0x800;                     \\r
+  .previous\r
 \r
 VOID\r
 EFIAPI\r