From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from zimbra2.kalray.eu ([92.103.151.219]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jTKpP-0002Za-VD for barebox@lists.infradead.org; Tue, 28 Apr 2020 07:39:07 +0000 Date: Tue, 28 Apr 2020 09:38:46 +0200 (CEST) From: =?utf-8?Q?Cl=C3=A9ment?= Leger Message-ID: <1169677112.17884601.1588059526665.JavaMail.zimbra@kalray.eu> In-Reply-To: <20200428063907.GP5877@pengutronix.de> References: <20200423081712.4022-1-cleger@kalray.eu> <20200423081712.4022-5-cleger@kalray.eu> <20200428063907.GP5877@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 4/6] common: elf: add elf_open and elf_close To: Sascha Hauer Cc: Barebox List SGkgU2FzY2hhLAoKLS0tLS0gT24gMjggQXByLCAyMDIwLCBhdCAwODozOSwgU2FzY2hhIEhhdWVy IHMuaGF1ZXJAcGVuZ3V0cm9uaXguZGUgd3JvdGU6Cgo+IE9uIFRodSwgQXByIDIzLCAyMDIwIGF0 IDEwOjE3OjA5QU0gKzAyMDAsIENsZW1lbnQgTGVnZXIgd3JvdGU6Cj4+IFdoZW4gbG9hZGluZyBh biBlbGYgZmlsZSBmcm9tIGEgbXRkIGRldmljZSwgdGhpcyBhbGxvd3MgdG8gcGFyc2UgdGhlCj4+ IGhlYWRlciBhbmQgbG9hZCBvbmx5IHRoZSBuZWVkZWQgZGF0YSBhY2NvcmRpbmcgdG8gdGhlIGVs ZiBzaXplLiBXaXRob3V0Cj4+IHRoYXQgc3VwcG9ydCwgbG9hZGluZyBhIGVsZiBmaWxlIGZyb20g YSAvZGV2L210ZCB3b3VsZCB0cnkgdG8gcmVhZCB0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