From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 29 Oct 2014 13:49:03 +0100 Subject: [U-Boot] [PATCH v4 2/4] arm: make .vectors section allocatable In-Reply-To: <1414534572-6110-3-git-send-email-savoundg@gmail.com> References: <1414362326-6290-1-git-send-email-savoundg@gmail.com> <1414534572-6110-1-git-send-email-savoundg@gmail.com> <1414534572-6110-3-git-send-email-savoundg@gmail.com> Message-ID: <20141029134903.7178da69@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Georges, On Tue, 28 Oct 2014 23:16:10 +0100, Georges Savoundararadj wrote: > 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 > Cc: Albert Aribeau > Acked-by: Albert ARIBEAU > > --- > > Changes in v4: > - Add Acked-by from Albert > > Changes in v3: > - None > > Changes in v2: > - Reword the commit message > > arch/arm/lib/vectors.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S > index 0cb87ce..49238ed 100644 > --- a/arch/arm/lib/vectors.S > +++ b/arch/arm/lib/vectors.S > @@ -33,7 +33,7 @@ > ************************************************************************* > */ > > - .section ".vectors", "x" > + .section ".vectors", "ax" > > /* > ************************************************************************* > -- > 2.1.2 > Acked-by: Albert ARIBAUD Amicalement, -- Albert.