This is the mail archive of the
mailing list for the newlib project.
Re: [PATCH] ARM: Fix strcmp() for Thumb-1
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Cc: "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Tue, 28 May 2013 13:46:48 +0100
- Subject: Re: [PATCH] ARM: Fix strcmp() for Thumb-1
- References: <1369567629-11768-1-git-send-email-sebastian dot huber at embedded-brains dot de> <CAHFci29SAYS38Fw57ZvkWZ0KcUFpJzG5k9Tk-tgC0yMQHDWY1A at mail dot gmail dot com> <51A30453 dot 5070204 at embedded-brains dot de> <51A47AB5 dot 1010006 at arm dot com> <51A48E23 dot 6050804 at embedded-brains dot de>
On 28/05/13 11:59, Sebastian Huber wrote:
On 05/28/2013 11:36 AM, Richard Earnshaw wrote:
On 27/05/13 07:59, Sebastian Huber wrote:
On 05/27/2013 04:18 AM, Bin.Cheng wrote:
Though I have no right to approve the patch, I would like to have below
UAL is generally preferred, thus you may handle armv6-m specially by
keeping UAL for it. For example,
#if (defined(__thumb__) && defined(__ARM_ARCH_6M__))
Which problem does this additional pre-processor complexity solve? The
generated machine code is the same.
I don't think either patch is correct. Instead we should explicitly mark the
attributes in this case, probably as follows, but I've only smoke tested this.
Sebastian, does this fix your problem?
This patches fixes my problem. I get now this:
readelf -A ./arm-rtems4.11/thumb/newlib/libc/machine/arm/lib_a-strcmp.o
Attribute Section: aeabi
The application link process yields now an ARMv4T executable. Without the
patch I had "blx" instructions in the executable which are not supported on
Great. I've committed the patch with the following ChangeLog:
2013-05-28 Richard Earnshaw <email@example.com>
* libc/macine/arm/strcpy.S: Explicitly set build attributes when
building for thumb1 targets.