From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933867AbbI1NKw (ORCPT ); Mon, 28 Sep 2015 09:10:52 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:20567 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933753AbbI1NHj (ORCPT ); Mon, 28 Sep 2015 09:07:39 -0400 From: Matthew Fortune To: Alex Smith , Markos Chandras CC: linux-mips , Alex Smith , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 1/3] MIPS: Initial implementation of a VDSO Thread-Topic: [PATCH 1/3] MIPS: Initial implementation of a VDSO Thread-Index: AQHQ+dXhKXZqE/aOPUW9WE2ADuYAwZ5Rs5cAgAA0gAA= Date: Mon, 28 Sep 2015 13:07:36 +0000 Message-ID: <6D39441BF12EF246A7ABCE6654B023532128FCAD@LEMAIL01.le.imgtec.org> References: <1443434629-14325-1-git-send-email-markos.chandras@imgtec.com> <1443435011-17061-1-git-send-email-markos.chandras@imgtec.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.150.80.3] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t8SDAxrh010805 Alex Smith writes: > > + > > + /* lapc is an alias to addiupc reg, - . > > + * > > + * We can't use addiupc because there is no label-label > > + * support for the addiupc reloc > > + */ > > + __asm__("lapc %0, _start \n" > > + : "=r" (addr) : :); > > Just curious - if lapc is just an alias to addiupc, why does that work > but not addiupc? IIRC I did try addiupc previously but removed it > because it wasn't working, didn't know about lapc! This is just an unfortunate quirk of how the implementation is done in binutils. We don't recognise the special case that: addiupc , - . is the same as lapc , And therefore don't know that we can just use the MIPS_PC19_S2 reloc (name of that reloc may not be perfectly correct). It is a special case as the RHS of the expression in ADDIUPC above can be theoretically anything so we only support assembly time constants with addiupc. Apart from the need to document the LAPC alias somewhere I'm not sure we need do anything to improve addiupc itself particularly. Thanks, Matthew ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¥Š{±þG«�éÿŠ{ayºʇڙë,j­¢f£¢·hš�ï�êÿ‘êçz_è®(­éšŽŠÝ¢j"�ú¶m§ÿÿ¾«þG«�éÿ¢¸?™¨è­Ú&£ø§~�á¶iO•æ¬z·švØ^¶m§ÿÿà ÿ¶ìÿ¢¸?–I¥