[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/12826] New: [PATCH] Gold not knowing ARM7EM architecture

From: asierllano at gmail dot com
Subject: [Bug gold/12826] New: [PATCH] Gold not knowing ARM7EM architecture
Date: Tue, 31 May 2011 12:07:00 +0000


           Summary: [PATCH] Gold not knowing ARM7EM architecture
           Product: binutils
           Version: 2.21
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
        AssignedTo: address@hidden
        ReportedBy: address@hidden

Created attachment 5760
  --> http://sourceware.org/bugzilla/attachment.cgi?id=5760
Patch with the proposed change

When compiling code with gcc-4.6.0 for cpu "cortex-m4" it generates code for
ARM7EM. The gold 2.21 linker tells: "unknown CPU architecture".

The error is in line 10006 of gold/arm.cc:
 if (oldtag >= elfcpp::MAX_TAG_CPU_ARCH || newtag >= elfcpp::MAX_TAG_CPU_ARCH)

This detects an error in the architecture, but if the oldtag or newtag is just
the same as elfcpp::MAX_TAG_CPU_ARCH, it detects it incorrectly as unknown CPU.
Line 242 of elfcpp/arm.h:

So it is as simple to fix as changing previous line by:
 if (oldtag > elfcpp::MAX_TAG_CPU_ARCH || newtag > elfcpp::MAX_TAG_CPU_ARCH)

So the value TAG_CPU_ARCH_V7E_M is not detected as an unknown CPU.

Included patch for easy applying.

Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]