From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4548 invoked by alias); 4 Nov 2013 20:32:42 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 4537 invoked by uid 89); 4 Nov 2013 20:32:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.2 X-HELO: multi.imgtec.com Received: from Unknown (HELO multi.imgtec.com) (194.200.65.239) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 04 Nov 2013 20:32:40 +0000 From: Jack Carter To: "amodra@gmail.com" CC: "binutils@sourceware.org" Subject: Re: [PATCH 0/9] PowerPC64 ELFv2 ABI support. Date: Mon, 04 Nov 2013 20:32:00 -0000 Message-ID: <4CEFBC1BE64A8048869F799EF2D2EEEE4C513D6A@BADAG02.ba.imgtec.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-SEF-Processed: 7_3_0_01192__2013_11_04_20_32_31 X-SW-Source: 2013-11/txt/msg00028.txt.bz2 Alan, Could you point me to the ELFv2 ABI documentation and has it been=20 registered anywhere official? My googling doesn't seem to be finding it. Thanks, Jack On 10/29/2013 07:19 PM, Alan Modra wrote:> This patch series makes the chan= ges necessary in binutils to support > the updated PowerPC64 ABI, which we're calling ELFv2. Two major > changes from the previous ABI are >=20 > - No function descriptors. > Functions set up their got/toc pointer as necessary on entry. The > plt consists of single dword addresses. Function pointers point at > the function code. To make this work efficiently with static > linking, functions have *two* entry points, one we call the "global > entry" and another we call the "local entry". The global entry > point is the address stored in function pointers, and it is a > requirement that calls to the global entry point have that address > in r12. This is no hardship since calls via function pointers or > the plt will always use a sequence that loads the address into a > general purpose register, moves it to the count register, then > branches to the count register. We just needed to make sure r12 was > the gpr used. The "local entry" is used when the toc pointer is > known to already be valid for the function, typically true for > static linking, allowing the toc pointer setup to be skipped. >=20 > - Reduced stack frame size. > We removed the compiler and linker save words, and removed the > parameter save area for most functions. This means the minimum > stack frame overhead is reduced from 112 bytes to 32 bytes (for > functions that need a frame), and many functions will used just the > minimum. After some debate, we decided to keep the stack back-chain > word. >=20 > The ABI's are incompatible. It won't be possible to link old objects > with new except in rare cases, or to use old shared libraries with new > executables at run time. >=20 > The first two patches in this series make changes that affect the old > ABI too, the first one fixing a hole in the PowerPC64 ABI, and the > second one makes all stubs conform with the ELFv2 ABI requirement on > r12. >=20