Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: Manjukumar Harthikote Matha <manjukumar.harthikote-matha@xilinx.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH][Morty] binutils-2.27.inc: Fix alignment frags for aarch64
Date: Tue, 22 Nov 2016 15:36:16 -0800	[thread overview]
Message-ID: <6c654497-ceec-07d6-7e6e-2e7d06486880@gmail.com> (raw)
In-Reply-To: <220ac38a-b960-6a9a-84f1-f9a58c936537@xilinx.com>


[-- Attachment #1.1: Type: text/plain, Size: 8864 bytes --]



On 11/22/16 3:08 PM, Manjukumar Harthikote Matha wrote:
> Hi Khem,
> 
> On 11/22/2016 02:03 PM, Khem Raj wrote:
>> This is ok for master
> Is there a particular reason not have in Morty? We have arm-trusted-firmware
> failing to build due to this issue. I have submitted a patch to master as well

Once its in master, it should get into morty subsequently.

> 
> Thanks
> Manju
> 
>>
>>
>> On Nov 22, 2016 1:31 PM, "Manjukumar Matha"
>> <manjukumar.harthikote-matha@xilinx.com
>> <mailto:manjukumar.harthikote-matha@xilinx.com>> wrote:
>>
>>     There was bug with alignment frags for aarch64 in binutils. This is
>>     fixed in master of binutils. This patch backports the fix to binutils
>>     2.27 version.
>>
>>     Signed-off-by: Manjukumar Matha
>>     <manjukumar.harthikote-matha@xilinx.com
>>     <mailto:manjukumar.harthikote-matha@xilinx.com>>
>>     Signed-off-by: Nathan Rossi <nathan@nathanrossi.com
>>     <mailto:nathan@nathanrossi.com>>
>>     ---
>>      meta/recipes-devtools/binutils/binutils-2.27.inc   |   1 +
>>      ...eration-of-alignment-frags-in-code-sectio.patch | 139
>>     +++++++++++++++++++++
>>      2 files changed, 140 insertions(+)
>>      create mode 100644
>>    
>> meta/recipes-devtools/binutils/binutils/0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch
>>
>>
>>     diff --git a/meta/recipes-devtools/binutils/binutils-2.27.inc
>>     b/meta/recipes-devtools/binutils/binutils-2.27.inc
>>     index fc81721..90518bf 100644
>>     --- a/meta/recipes-devtools/binutils/binutils-2.27.inc
>>     +++ b/meta/recipes-devtools/binutils/binutils-2.27.inc
>>     @@ -37,6 +37,7 @@ SRC_URI = "\
>>           file://0015-binutils-mips-gas-pic-relax-linkonce.diff \
>>
>>     file://0015-Refine-.cfi_sections-check-to-only-consider-compact-.patch \
>>
>>     file://0016-Fix-seg-fault-in-ARM-linker-when-trying-to-parse-a-b.patch \
>>     +
>>      file://0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch
>>     \
>>      "
>>      S  = "${WORKDIR}/git"
>>
>>     diff --git
>>    
>> a/meta/recipes-devtools/binutils/binutils/0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch
>>
>>    
>> b/meta/recipes-devtools/binutils/binutils/0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch
>>
>>     new file mode 100644
>>     index 0000000..f8b46be
>>     --- /dev/null
>>     +++
>>    
>> b/meta/recipes-devtools/binutils/binutils/0017-Fix-the-generation-of-alignment-frags-in-code-sectio.patch
>>
>>     @@ -0,0 +1,139 @@
>>     +From 4a4286465b5d6c28968bc2b29ae08daca7f219a3 Mon Sep 17 00:00:00 2001
>>     +From: Nick Clifton <nickc@redhat.com <mailto:nickc@redhat.com>>
>>     +Date: Fri, 18 Nov 2016 11:42:48 -0800
>>     +Subject: [PATCH] Fix the generation of alignment frags in code
>>     sections for AArch64.
>>     +
>>     +PR gas/20364
>>     +* config/tc-aarch64.c (s_ltorg): Change the mapping state after
>>     +aligning the frag.
>>     +(aarch64_init): Treat rs_align frags in code sections as
>>     +containing code, not data.
>>     +* testsuite/gas/aarch64/pr20364.s: New test.
>>     +* testsuite/gas/aarch64/pr20364.d: New test driver.
>>     +
>>     +Backporting the patch from binutils mainline
>>    
>> +https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ea12e5c3ad54da440c08f32da09534e63e515ca
>>
>>    
>> <https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7ea12e5c3ad54da440c08f32da09534e63e515ca>
>>
>>     +
>>     +Upstream-Status: Backport
>>     +
>>     +Signed-off-by: Manjukumar Matha
>>     <manjukumar.harthikote-matha@xilinx.com
>>     <mailto:manjukumar.harthikote-matha@xilinx.com>>
>>     +---
>>     + gas/ChangeLog                       | 10 ++++++++++
>>     + gas/config/tc-aarch64.c             | 10 +++++++---
>>     + gas/testsuite/gas/aarch64/pr20364.d | 13 +++++++++++++
>>     + gas/testsuite/gas/aarch64/pr20364.s | 28 ++++++++++++++++++++++++++++
>>     + 4 files changed, 58 insertions(+), 3 deletions(-)
>>     + create mode 100644 gas/testsuite/gas/aarch64/pr20364.d
>>     + create mode 100644 gas/testsuite/gas/aarch64/pr20364.s
>>     +
>>     +diff --git a/gas/ChangeLog b/gas/ChangeLog
>>     +index a39895a..fad06dc 100644
>>     +--- a/gas/ChangeLog
>>     ++++ b/gas/ChangeLog
>>     +@@ -1,3 +1,13 @@
>>     ++2016-08-05  Nick Clifton  <nickc@redhat.com <mailto:nickc@redhat.com>>
>>     ++
>>     ++      PR gas/20364
>>     ++      * config/tc-aarch64.c (s_ltorg): Change the mapping state after
>>     ++      aligning the frag.
>>     ++      (aarch64_init): Treat rs_align frags in code sections as
>>     ++      containing code, not data.
>>     ++      * testsuite/gas/aarch64/pr20364.s: New test.
>>     ++      * testsuite/gas/aarch64/pr20364.d: New test driver.
>>     ++
>>     + 2016-08-03  Tristan Gingold  <gingold@adacore.com
>>     <mailto:gingold@adacore.com>>
>>     +
>>     +       * configure: Regenerate.
>>     +diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
>>     +index ddc40f2..74933cb 100644
>>     +--- a/gas/config/tc-aarch64.c
>>     ++++ b/gas/config/tc-aarch64.c
>>     +@@ -1736,13 +1736,13 @@ s_ltorg (int ignored ATTRIBUTE_UNUSED)
>>     +       if (pool == NULL || pool->symbol == NULL ||
>>     pool->next_free_entry == 0)
>>     +       continue;
>>     +
>>     +-      mapping_state (MAP_DATA);
>>     +-
>>     +       /* Align pool as you have word accesses.
>>     +          Only make a frag if we have to.  */
>>     +       if (!need_pass_2)
>>     +       frag_align (align, 0, 0);
>>     +
>>     ++      mapping_state (MAP_DATA);
>>     ++
>>     +       record_alignment (now_seg, align);
>>     +
>>     +       sprintf (sym_name, "$$lit_\002%x", pool->id);
>>     +@@ -6373,11 +6373,15 @@ aarch64_init_frag (fragS * fragP, int
>>     max_chars)
>>     +
>>     +   switch (fragP->fr_type)
>>     +     {
>>     +-    case rs_align:
>>     +     case rs_align_test:
>>     +     case rs_fill:
>>     +       mapping_state_2 (MAP_DATA, max_chars);
>>     +       break;
>>     ++    case rs_align:
>>     ++      /* PR 20364: We can get alignment frags in code sections,
>>     ++       so do not just assume that we should use the MAP_DATA
>>     state.  */
>>     ++      mapping_state_2 (subseg_text_p (now_seg) ? MAP_INSN :
>>     MAP_DATA, max_chars);
>>     ++      break;
>>     +     case rs_align_code:
>>     +       mapping_state_2 (MAP_INSN, max_chars);
>>     +       break;
>>     +diff --git a/gas/testsuite/gas/aarch64/pr20364.d
>>     b/gas/testsuite/gas/aarch64/pr20364.d
>>     +new file mode 100644
>>     +index 0000000..babcff1
>>     +--- /dev/null
>>     ++++ b/gas/testsuite/gas/aarch64/pr20364.d
>>     +@@ -0,0 +1,13 @@
>>     ++# Check that ".align <size>, <fill>" does not set the mapping
>>     state to DATA, causing unnecessary frag generation.
>>     ++#name: PR20364
>>     ++#objdump: -d
>>     ++
>>     ++.*:     file format .*
>>     ++
>>     ++Disassembly of section \.vectors:
>>     ++
>>     ++0+000 <.*>:
>>     ++   0: d2800000        mov     x0, #0x0                        // #0
>>     ++   4: 94000000        bl      0 <plat_report_exception>
>>     ++   8: 17fffffe        b       0 <bl1_exceptions>
>>     ++
>>     +diff --git a/gas/testsuite/gas/aarch64/pr20364.s
>>     b/gas/testsuite/gas/aarch64/pr20364.s
>>     +new file mode 100644
>>     +index 0000000..594ad7c
>>     +--- /dev/null
>>     ++++ b/gas/testsuite/gas/aarch64/pr20364.s
>>     +@@ -0,0 +1,28 @@
>>     ++ .macro vector_base label
>>     ++ .section .vectors, "ax"
>>     ++ .align 11, 0
>>     ++ \label:
>>     ++ .endm
>>     ++
>>     ++ .macro vector_entry label
>>     ++ .section .vectors, "ax"
>>     ++ .align 7, 0
>>     ++ \label:
>>     ++ .endm
>>     ++
>>     ++ .macro check_vector_size since
>>     ++   .if (. - \since) > (32 * 4)
>>     ++     .error "Vector exceeds 32 instructions"
>>     ++   .endif
>>     ++ .endm
>>     ++
>>     ++ .globl bl1_exceptions
>>     ++
>>     ++vector_base bl1_exceptions
>>     ++
>>     ++vector_entry SynchronousExceptionSP0
>>     ++ mov x0, #0x0
>>     ++ bl plat_report_exception
>>     ++ b SynchronousExceptionSP0
>>     ++ check_vector_size SynchronousExceptionSP0
>>     ++
>>     +--
>>     +2.7.4
>>     +
>>     --
>>     2.7.4
>>
>>     --
>>     _______________________________________________
>>     Openembedded-core mailing list
>>     Openembedded-core@lists.openembedded.org
>>     <mailto:Openembedded-core@lists.openembedded.org>
>>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
>>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

  reply	other threads:[~2016-11-22 23:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-22 21:01 [PATCH][Morty] binutils-2.27.inc: Fix alignment frags for aarch64 Manjukumar Matha
2016-11-22 22:03 ` Khem Raj
2016-11-22 23:08   ` Manjukumar Harthikote Matha
2016-11-22 23:36     ` Khem Raj [this message]
2016-11-22 23:36       ` Manjukumar Harthikote Matha
2016-12-15 22:28   ` Manjukumar Harthikote Matha
2016-12-19 13:04     ` Burton, Ross
2016-12-19 13:05       ` Burton, Ross
2016-12-19 21:29         ` Manjukumar Harthikote Matha
2017-01-16 17:49   ` Manjukumar Harthikote Matha
2017-01-18  9:37     ` Mike Looijmans
2017-01-18 12:08       ` Nathan Rossi
2017-01-18 16:09         ` akuster808
2017-01-18 20:16           ` Manjukumar Harthikote Matha
2017-01-24  6:48           ` Mike Looijmans
2017-01-24 15:45             ` akuster808
2017-01-30  7:18               ` Mike Looijmans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6c654497-ceec-07d6-7e6e-2e7d06486880@gmail.com \
    --to=raj.khem@gmail.com \
    --cc=manjukumar.harthikote-matha@xilinx.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox