From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 40383 invoked by alias); 12 Nov 2015 12:09:57 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 40265 invoked by uid 9119); 12 Nov 2015 12:09:55 -0000 Date: Thu, 12 Nov 2015 12:09:00 -0000 Message-ID: <20151112120955.40263.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Joseph Myers To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Avoid .eh_frame in ARM newlib. X-Act-Checkin: newlib-cygwin X-Git-Author: Joseph Myers X-Git-Refname: refs/heads/master X-Git-Oldrev: 4998ac43411001a4757537b0312443493cf69112 X-Git-Newrev: e6459123e497409a9e3d845c39829a9602ba55a4 X-SW-Source: 2015-q4/txt/msg00035.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=e6459123e497409a9e3d845c39829a9602ba55a4 commit e6459123e497409a9e3d845c39829a9602ba55a4 Author: Joseph Myers Date: Thu Nov 12 12:09:24 2015 +0000 Avoid .eh_frame in ARM newlib. ARM newlib has various strcmp implementations that use .cfi_* directives to generate unwind information. The effect of this is that the generated objects contain .eh_frame sections. However, ARM uses its own unwind info format, not .eh_frame, which is generated by ARM-specific directives, not .cfi_*. The .eh_frame sections are useless, but also not removed by strip and may be loaded into memory at runtime. This patch fixes this by using .cfi_sections .debug_frame (as in glibc) so that the directives generate .debug_frame instead. .debug_frame is useful for the debugger, can be removed by strip, and is not loaded into memory at runtime. * libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections .debug_frame. * libc/machine/arm/strcmp-armv4.S: Likewise. * libc/machine/arm/strcmp-armv4t.S: Likewise. * libc/machine/arm/strcmp-armv6.S: Likewise. * libc/machine/arm/strcmp-armv6m.S: Likewise. * libc/machine/arm/strcmp-armv7.S: Likewise. * libc/machine/arm/strcmp-armv7m.S: Likewise. Diff: --- newlib/ChangeLog | 11 +++++++++++ newlib/libc/machine/arm/strcmp-arm-tiny.S | 1 + newlib/libc/machine/arm/strcmp-armv4.S | 1 + newlib/libc/machine/arm/strcmp-armv4t.S | 1 + newlib/libc/machine/arm/strcmp-armv6.S | 1 + newlib/libc/machine/arm/strcmp-armv6m.S | 1 + newlib/libc/machine/arm/strcmp-armv7.S | 1 + newlib/libc/machine/arm/strcmp-armv7m.S | 1 + 8 files changed, 18 insertions(+) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index c38588b..9ae8c8d 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,14 @@ +2015-11-12 Joseph Myers + + * libc/machine/arm/strcmp-arm-tiny.S: Use .cfi_sections + .debug_frame. + * libc/machine/arm/strcmp-armv4.S: Likewise. + * libc/machine/arm/strcmp-armv4t.S: Likewise. + * libc/machine/arm/strcmp-armv6.S: Likewise. + * libc/machine/arm/strcmp-armv6m.S: Likewise. + * libc/machine/arm/strcmp-armv7.S: Likewise. + * libc/machine/arm/strcmp-armv7m.S: Likewise. + 2015-11-06 Marcus Shawcroft * libc/machine/arm/Makefile.am: Drop MEMCHR_SRC and MEMCHR_OBJ. diff --git a/newlib/libc/machine/arm/strcmp-arm-tiny.S b/newlib/libc/machine/arm/strcmp-arm-tiny.S index 158133f..6b6bd13 100644 --- a/newlib/libc/machine/arm/strcmp-arm-tiny.S +++ b/newlib/libc/machine/arm/strcmp-arm-tiny.S @@ -31,6 +31,7 @@ .syntax unified def_fn strcmp + .cfi_sections .debug_frame .cfi_startproc 1: ldrb r2, [r0], #1 diff --git a/newlib/libc/machine/arm/strcmp-armv4.S b/newlib/libc/machine/arm/strcmp-armv4.S index b18c3db..05e3df6 100644 --- a/newlib/libc/machine/arm/strcmp-armv4.S +++ b/newlib/libc/machine/arm/strcmp-armv4.S @@ -45,6 +45,7 @@ .arm def_fn strcmp + .cfi_sections .debug_frame .cfi_startproc eor tmp1, src1, src2 tst tmp1, #3 diff --git a/newlib/libc/machine/arm/strcmp-armv4t.S b/newlib/libc/machine/arm/strcmp-armv4t.S index 2716b87..d01d840 100644 --- a/newlib/libc/machine/arm/strcmp-armv4t.S +++ b/newlib/libc/machine/arm/strcmp-armv4t.S @@ -36,6 +36,7 @@ .eabi_attribute Tag_also_compatible_with, "\006\013" /* ARMv6-M. */ .eabi_attribute Tag_ARM_ISA_use, 0 def_fn strcmp + .cfi_sections .debug_frame .cfi_startproc 1: ldrb r2, [r0] diff --git a/newlib/libc/machine/arm/strcmp-armv6.S b/newlib/libc/machine/arm/strcmp-armv6.S index a557fc5..657c1ee 100644 --- a/newlib/libc/machine/arm/strcmp-armv6.S +++ b/newlib/libc/machine/arm/strcmp-armv6.S @@ -131,6 +131,7 @@ def_fn strcmp cmpcs r2, r3 bne .Lfastpath_exit #endif + .cfi_sections .debug_frame .cfi_startproc strd r4, r5, [sp, #-16]! .cfi_def_cfa_offset 16 diff --git a/newlib/libc/machine/arm/strcmp-armv6m.S b/newlib/libc/machine/arm/strcmp-armv6m.S index 932841d..74f87cb 100644 --- a/newlib/libc/machine/arm/strcmp-armv6m.S +++ b/newlib/libc/machine/arm/strcmp-armv6m.S @@ -53,6 +53,7 @@ .text def_fn strcmp + .cfi_sections .debug_frame .cfi_startproc mov r2, r0 push {r4, r5, r6, lr} diff --git a/newlib/libc/machine/arm/strcmp-armv7.S b/newlib/libc/machine/arm/strcmp-armv7.S index e2c47ff..2f93bfb 100644 --- a/newlib/libc/machine/arm/strcmp-armv7.S +++ b/newlib/libc/machine/arm/strcmp-armv7.S @@ -136,6 +136,7 @@ def_fn strcmp cmpcs r2, r3 bne .Lfastpath_exit #endif + .cfi_sections .debug_frame .cfi_startproc strd r4, r5, [sp, #-16]! .cfi_def_cfa_offset 16 diff --git a/newlib/libc/machine/arm/strcmp-armv7m.S b/newlib/libc/machine/arm/strcmp-armv7m.S index d66d393..7b63049 100644 --- a/newlib/libc/machine/arm/strcmp-armv7m.S +++ b/newlib/libc/machine/arm/strcmp-armv7m.S @@ -44,6 +44,7 @@ .thumb .syntax unified def_fn strcmp + .cfi_sections .debug_frame .cfi_startproc eor tmp1, src1, src2 tst tmp1, #3