]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: make .vectors section allocatable
authorGeorges Savoundararadj <savoundg@gmail.com>
Tue, 28 Oct 2014 22:16:10 +0000 (23:16 +0100)
committerTom Rini <trini@ti.com>
Wed, 29 Oct 2014 13:02:17 +0000 (09:02 -0400)
A regression was introduced in commit 41623c91. The consequence of that
is the non-relocation of the section .vectors symbols :
_undefined_instruction, _software_interrupt, _prefetch_abort,
_data_abort, _not_used, _irq and _fiq.

Before commit 41623c91, the exception vectors were in a .text section.
The .text section has the attributes allocatable and executable [1].

In commit 41623c91, a specific section is created, called .vectors, with
the attribute executable only.

What have changed between commit 41623c91^ and 41623c91 is the attribute
of the section which contains the exception vectors.
An allocatable section is "a section [that] occupies memory during
process execution" [1] which is the case of the section .vectors.
Adding the lacking attribute (SHF_ALLOC or "a") for the definition of
the section .vectors fixed the issue.

To summarize, the fix has to mark .vectors as allocatable because the
exception vectors reside in "memory during execution" and they need to
be relocated.

[1] http://man7.org/linux/man-pages/man5/elf.5.html

Signed-off-by: Georges Savoundararadj <savoundg@gmail.com>
Acked-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
arch/arm/lib/vectors.S

index 0cb87cee7f611ddb250b0ced65c5c816db0cc930..49238ed21ed83766fe207c1060cef4e5b2d4257d 100644 (file)
@@ -33,7 +33,7 @@
  *************************************************************************
  */
 
-       .section ".vectors", "x"
+       .section ".vectors", "ax"
 
 /*
  *************************************************************************