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.90_1 #2 (Red Hat Linux)) id 1h6e5A-0006oD-PC for barebox@lists.infradead.org; Wed, 20 Mar 2019 16:28:51 +0000 Date: Wed, 20 Mar 2019 17:28:44 +0100 (CET) From: =?utf-8?Q?Cl=C3=A9ment?= Leger Message-ID: <64949728.4732605.1553099324820.JavaMail.zimbra@kalray.eu> In-Reply-To: <1029133302.4680876.1553069889561.JavaMail.zimbra@kalray.eu> References: <2115635878.3947318.1552936607997.JavaMail.zimbra@kalray.eu> <20190320080506.xttdoivywbkaptx5@pengutronix.de> <1029133302.4680876.1553069889561.JavaMail.zimbra@kalray.eu> 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] elf: add 64 bits elf support To: Sascha Hauer Cc: Barebox List SGVyZSBpcyBhIFYyIHdoaWNoIHVzZXMgY29ycmVjdCB0eXBlIGZvciBlbGYgaGVhZGVyIGFjY2Vz cyBtYWNyb3MKKGluc3RlYWQgb2Ygc2ltcGx5IHVuc2lnbmVkIGxvbmcpLiBNb3Jlb3ZlciB0eXBl cyB1c2VkIGFyZSBub3cKb2YgZml4ZWQgc2l6ZSB0eXBlICh1NjQgaW5zdGVhZCBvZiB1bnNpZ25l ZCBsb25nKS4gVGhpcyBjb3VsZApwb3RlbnRpYWxseSBhbGxvdyBhIDMyYml0IGJhcmVib3ggdG8g bG9hZCBhIDY0Yml0IGVsZiB1c2luZyBzb21lIGN1c3RvbQpoYXJkd2FyZSB3aGljaCBzdXBwb3J0 IDY0Yml0IGFkZHJlc3NpbmcgKERNQSBvciBzdWNoIHRoaW5nKS4KCgpUaGlzIHBhdGNoIGFkZCBl bGY2N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