From patchwork Tue Jun 16 09:27:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Szabolcs Nagy X-Patchwork-Id: 7197 Received: (qmail 33496 invoked by alias); 16 Jun 2015 09:27:29 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 33481 invoked by uid 89); 16 Jun 2015 09:27:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Message-ID: <557FEBFB.7090902@arm.com> Date: Tue, 16 Jun 2015 10:27:23 +0100 From: Szabolcs Nagy User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: GNU C Library CC: Marcus Shawcroft Subject: Re: [PATCH][AArch64] Fix cfi_adjust_cfa_offset usage in dl-tlsdesc.S References: <55379BBE.6020501@arm.com> In-Reply-To: <55379BBE.6020501@arm.com> X-MC-Unique: 28D6q2QoT2ChRNfZhKFU4A-1 On 22/04/15 14:01, Szabolcs Nagy wrote: > Some of the cfi annotations used incorrect sign. > (This is a trivial patch, but depends on the fix > for lazy TLSDESC initialization) > updated for https://sourceware.org/ml/libc-alpha/2015-06/msg00496.html 2015-06-16 Szabolcs Nagy * sysdeps/aarch64/dl-tlsdesc.S (_dl_tlsdesc_return_lazy): Fix cfi_adjust_cfa_offset argument. (_dl_tlsdesc_undefweak, _dl_tlsdesc_dynamic): Likewise. (_dl_tlsdesc_resolve_rela, _dl_tlsdesc_resolve_hold): Likewise. diff --git a/sysdeps/aarch64/dl-tlsdesc.S b/sysdeps/aarch64/dl-tlsdesc.S index c7adf79..64719eb 100644 --- a/sysdeps/aarch64/dl-tlsdesc.S +++ b/sysdeps/aarch64/dl-tlsdesc.S @@ -118,7 +118,7 @@ _dl_tlsdesc_return_lazy: .align 2 _dl_tlsdesc_undefweak: str x1, [sp, #-16]! - cfi_adjust_cfa_offset(16) + cfi_adjust_cfa_offset (16) /* The ldar here happens after the load from [x0] at the call site (that is generated by the compiler as part of the TLS access ABI), so it reads the same value (this function is the final value of @@ -130,7 +130,7 @@ _dl_tlsdesc_undefweak: mrs x1, tpidr_el0 sub x0, x0, x1 ldr x1, [sp], #16 - cfi_adjust_cfa_offset(16) + cfi_adjust_cfa_offset (-16) RET cfi_endproc .size _dl_tlsdesc_undefweak, .-_dl_tlsdesc_undefweak @@ -208,7 +208,7 @@ _dl_tlsdesc_dynamic: ldp x3, x4, [sp, #32+16*1] ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS) - cfi_adjust_cfa_offset (32+16*NSAVEXREGPAIRS) + cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS) # undef NSAVEXREGPAIRS RET 2: @@ -297,7 +297,7 @@ _dl_tlsdesc_resolve_rela: ldp x15, x16, [sp, #32+16*6] ldp x17, x18, [sp, #32+16*7] ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS) - cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS) + cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS) ldp x2, x3, [sp], #16 cfi_adjust_cfa_offset (-16) RET @@ -359,7 +359,7 @@ _dl_tlsdesc_resolve_hold: ldp x15, x16, [sp, #32+16*7] ldp x17, x18, [sp, #32+16*8] ldp x29, x30, [sp], #(32+16*NSAVEXREGPAIRS) - cfi_adjust_cfa_offset (-32+16*NSAVEXREGPAIRS) + cfi_adjust_cfa_offset (-32-16*NSAVEXREGPAIRS) RET cfi_endproc .size _dl_tlsdesc_resolve_hold, .-_dl_tlsdesc_resolve_hold