[{"id":1699334,"web_url":"http://patchwork.ozlabs.org/comment/1699334/","msgid":"<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>","list_archive_url":null,"date":"2017-06-23T15:21:20","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":15030,"url":"http://patchwork.ozlabs.org/api/people/15030/","name":"Daniel Schwierzeck","email":"daniel.schwierzeck@gmail.com"},"content":"Am 19.06.2017 um 20:53 schrieb Paul Burton:\n> U-Boot has up until now built with -fpic for the MIPS architecture,\n> producing position independent code which uses indirection through a\n> global offset table, making relocation fairly straightforward as it\n> simply involves patching up GOT entries.\n> \n> Using -fpic does however have some downsides. The biggest of these is\n> that generated code is bloated in various ways. For example, function\n> calls are indirected through the GOT & the t9 register:\n> \n>   8f998064   lw     t9,-32668(gp)\n>   0320f809   jalr   t9\n> \n> Without -fpic the call is simply:\n> \n>   0f803f01   jal    be00fc04 <puts>\n> \n> This is more compact & faster (due to the lack of the load & the\n> dependency the jump has on its result). It is also easier to read &\n> debug because the disassembly shows what function is being called,\n> rather than just an offset from gp which would then have to be looked up\n> in the ELF to discover the target function.\n> \n> Another disadvantage of -fpic is that each function begins with a\n> sequence to calculate the value of the gp register, for example:\n> \n>   3c1c0004   lui    gp,0x4\n>   279c3384   addiu  gp,gp,13188\n>   0399e021   addu   gp,gp,t9\n> \n> Without using -fpic this sequence no longer appears at the start of each\n> function, reducing code size considerably.\n> \n> This patch switches U-Boot from building with -fpic to building with\n> -fno-pic, in order to gain the benefits described above. The cost of\n> this is an extra step during the build process to extract relocation\n> data from the ELF & write it into a new .rel section in a compact\n> format, plus the added complexity of dealing with multiple types of\n> relocation rather than the single type that applied to the GOT. The\n> benefit is smaller, cleaner, more debuggable code. The relocate_code()\n> function is reimplemented in C to handle the new relocation scheme,\n> which also makes it easier to read & debug.\n> \n> Taking maltael_defconfig as an example the size of u-boot.bin built\n> using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils\n> 2.24.90) shrinks from 254KiB to 224KiB.\n> \n> Signed-off-by: Paul Burton <paul.burton@imgtec.com>\n> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n> Cc: u-boot@lists.denx.de\n> \n> ---\n> \n> Changes in v3:\n> - Fix R_MIPS_26 case that was breaking qemu_mips_defconfig.\n> \n> Changes in v2:\n> - Drop unused .$@.relocs from Makefile.postlink.\n> - Remove PF_OBJCOPY & assign to OBJCOPYFLAGS directly in config.mk.\n> - Move declaration of __rel_start to asm/sections.h.\n> \n>  arch/mips/Makefile.postlink      |  23 +++\n>  arch/mips/config.mk              |  21 +-\n>  arch/mips/cpu/start.S            | 130 ------------\n>  arch/mips/cpu/u-boot.lds         |  41 +---\n>  arch/mips/include/asm/relocs.h   |  24 +++\n>  arch/mips/include/asm/sections.h |   7 +\n>  arch/mips/lib/Makefile           |   1 +\n>  arch/mips/lib/reloc.c            | 164 +++++++++++++++\n>  common/board_f.c                 |   2 +-\n>  tools/.gitignore                 |   1 +\n>  tools/Makefile                   |   2 +\n>  tools/mips-relocs.c              | 426 +++++++++++++++++++++++++++++++++++++++\n>  12 files changed, 663 insertions(+), 179 deletions(-)\n>  create mode 100644 arch/mips/Makefile.postlink\n>  create mode 100644 arch/mips/include/asm/relocs.h\n>  create mode 100644 arch/mips/lib/reloc.c\n>  create mode 100644 tools/mips-relocs.c\n> \nReviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\nTested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n\n\napplied to u-boot-mips/next, thanks.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3wvMcT5dWDz9sNW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 24 Jun 2017 01:21:44 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 926B1C21DE4; Fri, 23 Jun 2017 15:21:39 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 90C9BC21D55;\n\tFri, 23 Jun 2017 15:21:35 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid DCA84C21D55; Fri, 23 Jun 2017 15:21:33 +0000 (UTC)","from mail-wr0-f195.google.com (mail-wr0-f195.google.com\n\t[209.85.128.195])\n\tby lists.denx.de (Postfix) with ESMTPS id 6602CC21C8B\n\tfor <u-boot@lists.denx.de>; Fri, 23 Jun 2017 15:21:33 +0000 (UTC)","by mail-wr0-f195.google.com with SMTP id x23so13321742wrb.0\n\tfor <u-boot@lists.denx.de>; Fri, 23 Jun 2017 08:21:33 -0700 (PDT)","from ?IPv6:2003:5f:2c26:8900:fd2e:8751:9414:4a6d?\n\t(p2003005F2C268900FD2E875194144A6D.dip0.t-ipconnect.de.\n\t[2003:5f:2c26:8900:fd2e:8751:9414:4a6d])\n\tby smtp.gmail.com with ESMTPSA id\n\ty77sm5008775wrb.39.2017.06.23.08.21.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 23 Jun 2017 08:21:31 -0700 (PDT)"],"Authentication-Results":"ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"l0whNQIJ\"; dkim-atps=neutral","X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:from:openpgp:message-id:date:user-agent\n\t:mime-version:in-reply-to;\n\tbh=49J9YRcDL7suYf8uaSx+9Ciw/YYfcwgXWFvSeC/FRDg=;\n\tb=l0whNQIJTof+OoYg8RS7rtTjTmAwCfUCdr82TZ+AmpkGagd4BGBCxBObmb95Gm7AnH\n\tEq5CZk6rDSd9gXdt37PrxkMz9EIuo7Sy9BK8LDzXsy39X1Rw8DFVvDftC249I2LhSuVl\n\tuXxC7uQ+zKztUTnLEdSPRmssATXz62m6k23N0wdG8HYHQrAyjZx3plnndKb94PkQNd9w\n\tlM5Mfg/T8tyMOFpP0mONS1tq68xGkWFHGI7TrJ3A4+RnJQw8nZWPpM9fjbeyk5eRKda/\n\t2UPXJ40UpP66+ZHiGO3Oarg+awNEF/jOfvQJ0Gurjwr80FeynAiF6mKh69njP6p8uMT8\n\twvqQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:openpgp:message-id\n\t:date:user-agent:mime-version:in-reply-to;\n\tbh=49J9YRcDL7suYf8uaSx+9Ciw/YYfcwgXWFvSeC/FRDg=;\n\tb=fbd58r16r6+6uDBdcLEdmNSQbS0upHj67c0W5T75PLGNVp+/IIw9m0qSYCzlfYXXkx\n\tMMFYjcdIKnUAbvioCTmuXkHPYCAHAr9I/NfaDb7HXa96YQaAKVIUFu+HtbgR9+IoCS8g\n\tL7cuOU4ty9Q+wWm03AtorKKzn1PxILwPUCtBLJRAtg7ZQ6+rDm1sh/nFISl1SbjHmhr/\n\t+EG20dnkxUqLOMWKaXXvEQvFGLX+tKIehr3TpjVrCZsUjpFubpLMlJo+FsC28iwwhcec\n\tzBDlC9JZNYhFbMdLfdX6XDsT267EaXUFRfh7f/voPYZ7lR4/7ZaNn6azymCwT0v/H3LH\n\tH7EA==","X-Gm-Message-State":"AKS2vOxtLg1Ic35xxKmc1yXt8Ri1KdMC3atPQc0l8Ckjg3mlkm3z++Zh\n\top/1Y94klWpd5w==","X-Received":"by 10.28.183.11 with SMTP id h11mr5974170wmf.86.1498231292858;\n\tFri, 23 Jun 2017 08:21:32 -0700 (PDT)","To":"Paul Burton <paul.burton@imgtec.com>, u-boot@lists.denx.de","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>","From":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","Openpgp":"id=8C4E22B0E9754D7137265F81A90C48903C7DBE56","Message-ID":"<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>","Date":"Fri, 23 Jun 2017 17:21:20 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.1.1","MIME-Version":"1.0","In-Reply-To":"<20170619185347.13959-1-paul.burton@imgtec.com>","X-Content-Filtered-By":"Mailman/MimeDel 2.1.18","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============6393130384086166016==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1733021,"web_url":"http://patchwork.ozlabs.org/comment/1733021/","msgid":"<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>","list_archive_url":null,"date":"2017-07-30T12:27:13","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":64520,"url":"http://patchwork.ozlabs.org/api/people/64520/","name":"Álvaro Fernández Rojas","email":"noltari@gmail.com"},"content":"I've been a bit busy lately and I couldn't test this until now, but I have to say that this commit breaks u-boot bmips support :(\n\nBTW, I tried this on several bmips boards (one of them is a Netgear CG3100D, which uses u-boot.bin instead of u-boot.elf)\n\nDo you have any idea on what could be hapenning?\n\nRegards,\nÁlvaro.\n\nEl 23/06/2017 a las 17:21, Daniel Schwierzeck escribió:\n> \n> \n> Am 19.06.2017 um 20:53 schrieb Paul Burton:\n>> U-Boot has up until now built with -fpic for the MIPS architecture,\n>> producing position independent code which uses indirection through a\n>> global offset table, making relocation fairly straightforward as it\n>> simply involves patching up GOT entries.\n>>\n>> Using -fpic does however have some downsides. The biggest of these is\n>> that generated code is bloated in various ways. For example, function\n>> calls are indirected through the GOT & the t9 register:\n>>\n>>   8f998064   lw     t9,-32668(gp)\n>>   0320f809   jalr   t9\n>>\n>> Without -fpic the call is simply:\n>>\n>>   0f803f01   jal    be00fc04 <puts>\n>>\n>> This is more compact & faster (due to the lack of the load & the\n>> dependency the jump has on its result). It is also easier to read &\n>> debug because the disassembly shows what function is being called,\n>> rather than just an offset from gp which would then have to be looked up\n>> in the ELF to discover the target function.\n>>\n>> Another disadvantage of -fpic is that each function begins with a\n>> sequence to calculate the value of the gp register, for example:\n>>\n>>   3c1c0004   lui    gp,0x4\n>>   279c3384   addiu  gp,gp,13188\n>>   0399e021   addu   gp,gp,t9\n>>\n>> Without using -fpic this sequence no longer appears at the start of each\n>> function, reducing code size considerably.\n>>\n>> This patch switches U-Boot from building with -fpic to building with\n>> -fno-pic, in order to gain the benefits described above. The cost of\n>> this is an extra step during the build process to extract relocation\n>> data from the ELF & write it into a new .rel section in a compact\n>> format, plus the added complexity of dealing with multiple types of\n>> relocation rather than the single type that applied to the GOT. The\n>> benefit is smaller, cleaner, more debuggable code. The relocate_code()\n>> function is reimplemented in C to handle the new relocation scheme,\n>> which also makes it easier to read & debug.\n>>\n>> Taking maltael_defconfig as an example the size of u-boot.bin built\n>> using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils\n>> 2.24.90) shrinks from 254KiB to 224KiB.\n>>\n>> Signed-off-by: Paul Burton <paul.burton@imgtec.com>\n>> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n>> Cc: u-boot@lists.denx.de\n>>\n>> ---\n>>\n>> Changes in v3:\n>> - Fix R_MIPS_26 case that was breaking qemu_mips_defconfig.\n>>\n>> Changes in v2:\n>> - Drop unused .$@.relocs from Makefile.postlink.\n>> - Remove PF_OBJCOPY & assign to OBJCOPYFLAGS directly in config.mk.\n>> - Move declaration of __rel_start to asm/sections.h.\n>>\n>>  arch/mips/Makefile.postlink      |  23 +++\n>>  arch/mips/config.mk              |  21 +-\n>>  arch/mips/cpu/start.S            | 130 ------------\n>>  arch/mips/cpu/u-boot.lds         |  41 +---\n>>  arch/mips/include/asm/relocs.h   |  24 +++\n>>  arch/mips/include/asm/sections.h |   7 +\n>>  arch/mips/lib/Makefile           |   1 +\n>>  arch/mips/lib/reloc.c            | 164 +++++++++++++++\n>>  common/board_f.c                 |   2 +-\n>>  tools/.gitignore                 |   1 +\n>>  tools/Makefile                   |   2 +\n>>  tools/mips-relocs.c              | 426 +++++++++++++++++++++++++++++++++++++++\n>>  12 files changed, 663 insertions(+), 179 deletions(-)\n>>  create mode 100644 arch/mips/Makefile.postlink\n>>  create mode 100644 arch/mips/include/asm/relocs.h\n>>  create mode 100644 arch/mips/lib/reloc.c\n>>  create mode 100644 tools/mips-relocs.c\n>>\n> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>\n> \n> \n> applied to u-boot-mips/next, thanks.\n> \n> \n> \n> _______________________________________________\n> U-Boot mailing list\n> U-Boot@lists.denx.de\n> https://lists.denx.de/listinfo/u-boot\n>","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"oFqpNfnd\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xL20K3llNz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 30 Jul 2017 22:27:29 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 2AB99C21E4F; Sun, 30 Jul 2017 12:27:23 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 8AC2CC21E4F;\n\tSun, 30 Jul 2017 12:27:20 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 53C3CC21E4F; Sun, 30 Jul 2017 12:27:19 +0000 (UTC)","from mail-wm0-f67.google.com (mail-wm0-f67.google.com\n\t[74.125.82.67])\n\tby lists.denx.de (Postfix) with ESMTPS id E4CE4C21C54\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 12:27:18 +0000 (UTC)","by mail-wm0-f67.google.com with SMTP id y206so9495563wmd.5\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 05:27:18 -0700 (PDT)","from [192.168.1.10] (3.red-83-52-40.dynamicip.rima-tde.net.\n\t[83.52.40.3]) by smtp.gmail.com with ESMTPSA id\n\tx98sm42360424wrb.47.2017.07.30.05.27.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 30 Jul 2017 05:27:17 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:from:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-transfer-encoding;\n\tbh=4NwagI2ptsygc3u8AfkxKDkfR99J9QhPpgpRnjDOyBk=;\n\tb=oFqpNfndgtv7nKFejV5t69e/bg2BSrekhJMUrBR34JJgMD8sDGkE2zPDAZ2F3jy5Qf\n\ts87k+umsGwSmbe8VoVhL7+gTsYcbIKEF8LGpARHRbRdzuZcea4/BcoQZDRPiFcrqvd8F\n\twox2Kh/lUUK9J71rudmlvOuq2ArQ4OQ40F/BALw9wtAf0b5lk1w6kobYsLduii/ww3lV\n\tlzBg20td0OmzISqxwMXaJvP5LMqFPaYZTwXnCKVGBMz4U4kyHeNhTYf1KdDjEhgryEQt\n\tXoE7qQdDqzNU1Z/WQCtfEfZF705blKviMtPtvLiiyXj0CbUKNxvQWiNfbQKA9sSw7TW+\n\tGc7w==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=4NwagI2ptsygc3u8AfkxKDkfR99J9QhPpgpRnjDOyBk=;\n\tb=s2kpp1s92aKr+xUbY3VZp4abpWUvEaGAQQ9Z0oyWWQvfYxHNJHm189oup2PBwhKKZl\n\tuA1qISASQTtbcCMGLUfR019Njp/zoqUdc1WU2J/PQNCBx/MpsbjHjMx6yxwAhFRUDyXr\n\tqUTBM6QvjhmAEEo25ujZUrm2EJkLtyw4GO7LWRIV/7QVOao63b7KvvTR3aMTTVNbqsKe\n\tCu6ySISRqFOKFD30uQYTxrEW5azuZBRTUEpoeYgEV4/nviDhRtr6zM4uop9xEHm9fuHn\n\tk022KHO4W+pB+UeI0ndmqxgEizZ2ogv6k7YK5+2lIBRcZHa7gqknRh9BRTDtTYPgFmxs\n\tjs6A==","X-Gm-Message-State":"AIVw110XpPG/GCN3fCP2K1LTuRE8YqugC1c/mT4AUQgdERUiTWSCkhGN\n\t09c2ng7f6S5SF6PGJec=","X-Received":"by 10.28.111.200 with SMTP id c69mr8412410wmi.115.1501417638259; \n\tSun, 30 Jul 2017 05:27:18 -0700 (PDT)","To":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,\n\tPaul Burton <paul.burton@imgtec.com>, u-boot@lists.denx.de","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>\n\t<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>","From":"=?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= <noltari@gmail.com>","Message-ID":"<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>","Date":"Sun, 30 Jul 2017 14:27:13 +0200","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1733056,"web_url":"http://patchwork.ozlabs.org/comment/1733056/","msgid":"<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>","list_archive_url":null,"date":"2017-07-30T14:05:37","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":15030,"url":"http://patchwork.ozlabs.org/api/people/15030/","name":"Daniel Schwierzeck","email":"daniel.schwierzeck@gmail.com"},"content":"Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n> I've been a bit busy lately and I couldn't test this until now, but I have to say that this commit breaks u-boot bmips support :(\n> \n> BTW, I tried this on several bmips boards (one of them is a Netgear CG3100D, which uses u-boot.bin instead of u-boot.elf)\n> \n> Do you have any idea on what could be hapenning?\n> \n\nmaybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\nfrom u-boot-elf.o. But u-boot-elf.o should already contain the correct\n.reloc section with the updated relocation entries so you don't need to\nrerun the reloc-tool on u-boot.elf.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"gGmNGqCN\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xL49x6DFyz9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 31 Jul 2017 00:05:56 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 68048C220A2; Sun, 30 Jul 2017 14:05:52 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id CBC69C21F60;\n\tSun, 30 Jul 2017 14:05:49 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid F3EDFC21F60; Sun, 30 Jul 2017 14:05:48 +0000 (UTC)","from mail-wm0-f65.google.com (mail-wm0-f65.google.com\n\t[74.125.82.65])\n\tby lists.denx.de (Postfix) with ESMTPS id 9E92AC21EC2\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 14:05:48 +0000 (UTC)","by mail-wm0-f65.google.com with SMTP id t138so13851913wmt.4\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 07:05:48 -0700 (PDT)","from [192.168.10.30] (p4FCC9F31.dip0.t-ipconnect.de.\n\t[79.204.159.49]) by smtp.gmail.com with ESMTPSA id\n\tp76sm7454771wrc.15.2017.07.30.07.05.46\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 30 Jul 2017 07:05:47 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:from:openpgp:message-id:date:user-agent\n\t:mime-version:in-reply-to;\n\tbh=vg4ctutUiVZ2HogTrMx449Xjyi/U5u8EYPHkj20++v0=;\n\tb=gGmNGqCN9NPc2ot83E5CHrpNV7jHO9TK09Pl3oMfKUklaExA5CZzuuj6bKCpBQ6JIy\n\tXhTu2w4QqpZEitch/efk18LAzALjIjbRDXG0vePHRy/WiVf0lJDqDTf57DBDjJbJBHm3\n\tX8KTgBVPdAIGhE76weZeYQHvLm+exHeYCPPgnSAUIB+5L6YA216KHYRlIF+KDF4soe/a\n\tPrSRgicnh+flSmNF01K796mBLioru4O9q+G0WwvF6CLGIj6vgUTrosccudyHr2qvMp1E\n\tin/Z3ofsS1gxdBUpk2kiEzjGJXWVB0dVqo9gSLHtXc2b+h1gKUuKbALI3aRuieYgdthl\n\toaGQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:openpgp:message-id\n\t:date:user-agent:mime-version:in-reply-to;\n\tbh=vg4ctutUiVZ2HogTrMx449Xjyi/U5u8EYPHkj20++v0=;\n\tb=bIA7bixxDT6o7CARR1KQ7PCaJKEB9okv5rdEefQT8BKaH5BMTUFTvVZCABzOcfh9oU\n\tQtL98XO4bMK8Z1993AkHgUZjp3mwnLnjMDlH4OZg0a/NWz8pGI+jTY4Lx1CMNtUhLcW8\n\tRN22vr7bcx0TpxzBGPildRJmWRkaeI4dbwDaasDdZU4aKLRyybZygLVEZSlhK/HkOt1O\n\tL8wcy8UNXOVNctK7263elc2vZB51cuHUSbXtC6zlEdj2FonMqy5m2GwAYr+jQhf3hq2f\n\tzXshWyaQUT8zsM+Tzv1ekqfDpD7OQzoiLQpjaIntuebthnji3M7PQ2jjdCj2kvFYX183\n\tsIbQ==","X-Gm-Message-State":"AIVw111DsZiChaaZpPTJ3rlKkPXf2QxqaGvWoqAyI7N+V+MZcJmeFNb/\n\torXUFBXbeNZ1pg==","X-Received":"by 10.28.178.204 with SMTP id b195mr8324122wmf.99.1501423548223; \n\tSun, 30 Jul 2017 07:05:48 -0700 (PDT)","To":"=?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= <noltari@gmail.com>,\n\tPaul Burton <paul.burton@imgtec.com>, u-boot@lists.denx.de","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>\n\t<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>\n\t<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>","From":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","Openpgp":"id=8C4E22B0E9754D7137265F81A90C48903C7DBE56","Message-ID":"<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>","Date":"Sun, 30 Jul 2017 16:05:37 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>","X-Content-Filtered-By":"Mailman/MimeDel 2.1.18","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============4092871137529676482==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1733086,"web_url":"http://patchwork.ozlabs.org/comment/1733086/","msgid":"<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>","list_archive_url":null,"date":"2017-07-30T16:04:33","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":64520,"url":"http://patchwork.ozlabs.org/api/people/64520/","name":"Álvaro Fernández Rojas","email":"noltari@gmail.com"},"content":"El 30/07/2017 a las 16:05, Daniel Schwierzeck escribió:\n> \n> \n> Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n>> I've been a bit busy lately and I couldn't test this until now, but I have to say that this commit breaks u-boot bmips support :(\n>>\n>> BTW, I tried this on several bmips boards (one of them is a Netgear CG3100D, which uses u-boot.bin instead of u-boot.elf)\n>>\n>> Do you have any idea on what could be hapenning?\n>>\n> \n> maybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\n> from u-boot-elf.o. But u-boot-elf.o should already contain the correct\n> .reloc section with the updated relocation entries so you don't need to\n> rerun the reloc-tool on u-boot.elf.\n> \n\nI tried that and it doesn't work.\nHowever, I've just found out that if I remove the relocs call it boots again...\nhttps://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"BOofYTy9\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xL6q75zl3z9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 31 Jul 2017 02:04:50 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 7F769C220F1; Sun, 30 Jul 2017 16:04:45 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 72ECDC21DBD;\n\tSun, 30 Jul 2017 16:04:41 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid BA5E6C21DBD; Sun, 30 Jul 2017 16:04:39 +0000 (UTC)","from mail-wm0-f49.google.com (mail-wm0-f49.google.com\n\t[74.125.82.49])\n\tby lists.denx.de (Postfix) with ESMTPS id 68B69C21D8D\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 16:04:39 +0000 (UTC)","by mail-wm0-f49.google.com with SMTP id t201so31045492wmt.0\n\tfor <u-boot@lists.denx.de>; Sun, 30 Jul 2017 09:04:39 -0700 (PDT)","from [192.168.1.10] (3.red-83-52-40.dynamicip.rima-tde.net.\n\t[83.52.40.3]) by smtp.gmail.com with ESMTPSA id\n\tq64sm9118490wmg.35.2017.07.30.09.04.37\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSun, 30 Jul 2017 09:04:38 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:from:message-id:date:user-agent:mime-version\n\t:in-reply-to:content-transfer-encoding;\n\tbh=Ly9RG8zBj3RtolQ9Xg1zuokqOQv7BclHs7kneiRr6ZI=;\n\tb=BOofYTy9r1b59i6OR78Vq6tbw9TO8LvS4kZp3X2JCjLlnVpGoBxucEkLxY3xctDv+L\n\tjhQuSd0p0dYh1DUdadARIHYu0H9VP2lfuRmLiKpXT3e+aFEPpyRobMxnDgLVWg/u/7kB\n\tGS1YGKghrCp6ZCG0Ah/V65dccxL03v47I+FiJDMtY/rMyWvCH2z2aUX/7mTRdKssH5o0\n\tz1qaWpeYA6UGVAt+q0duyEZ5yAXDvWMS0l6C4B9aWtnLGIxNdAe3P5192y0rdwhFiyyU\n\txet6saLkvdRAdFf0r8dAL/QrnXbCTFrGMhth+VQekJZPEe7BdTWRgqMWdwVQaN9mEkZO\n\tckGw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=Ly9RG8zBj3RtolQ9Xg1zuokqOQv7BclHs7kneiRr6ZI=;\n\tb=ZBhXpx684JJw3Wv9tyohBFtZAEowquRKlRdZ7V1rWtFmVhezHmQO5MqRT5XRxwx5Uz\n\tLnZlPfzvDLN5tT4HiUYpkMp6SY6KRQdPOsV4KrUupjoehSy1uCljSpLB/chZmIOKgqgm\n\t638uzB9HWimsNEif/jXZ0k8vSHwSNNQdqkUMXEPG0WVmULYzm+WNDw2PQ02j60L/+0uk\n\tPNj+rvJbRA4V8pO2qsygKKmTrC8P7wKdN6ghHbaVw5eL2nwGUXhzJ14Ps5XbpyOCQpM9\n\tAQtd5qou54tJ2RH7sKx6vEoqfnt2Nr+eGl/ZZFhiA0AjG/AjH2X3zUWNg8joJEpbCc19\n\ttERQ==","X-Gm-Message-State":"AIVw110OHX/YcACQrRl+8H3UCo/ylGVgQKTxUk+NTK3m6LZ0g0AYfXvW\n\tgo5t7FrVCtc6B1FRKrM=","X-Received":"by 10.28.236.8 with SMTP id k8mr9654700wmh.139.1501430678839;\n\tSun, 30 Jul 2017 09:04:38 -0700 (PDT)","To":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,\n\tPaul Burton <paul.burton@imgtec.com>, u-boot@lists.denx.de","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>\n\t<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>\n\t<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>\n\t<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>","From":"=?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= <noltari@gmail.com>","Message-ID":"<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>","Date":"Sun, 30 Jul 2017 18:04:33 +0200","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1733631,"web_url":"http://patchwork.ozlabs.org/comment/1733631/","msgid":"<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","list_archive_url":null,"date":"2017-07-31T10:52:57","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":15030,"url":"http://patchwork.ozlabs.org/api/people/15030/","name":"Daniel Schwierzeck","email":"daniel.schwierzeck@gmail.com"},"content":"2017-07-30 18:04 GMT+02:00 Álvaro Fernández Rojas <noltari@gmail.com>:\n>\n>\n> El 30/07/2017 a las 16:05, Daniel Schwierzeck escribió:\n>>\n>>\n>> Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n>>> I've been a bit busy lately and I couldn't test this until now, but I have to say that this commit breaks u-boot bmips support :(\n>>>\n>>> BTW, I tried this on several bmips boards (one of them is a Netgear CG3100D, which uses u-boot.bin instead of u-boot.elf)\n>>>\n>>> Do you have any idea on what could be hapenning?\n>>>\n>>\n>> maybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\n>> from u-boot-elf.o. But u-boot-elf.o should already contain the correct\n>> .reloc section with the updated relocation entries so you don't need to\n>> rerun the reloc-tool on u-boot.elf.\n>>\n>\n> I tried that and it doesn't work.\n> However, I've just found out that if I remove the relocs call it boots again...\n> https://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a\n\nI wonder how this can work. Even the u-boot.elf now contains\nposition-dependent code so that an update of the relocation entries is\nrequired there too. Without the updated entries, U-Boot can't execute\nafter jumping from relocate_code() to board_init_r(). Did you use a\nclean build if U-Boot?","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"s9ALvVbP\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xLbtj6Rccz9s03\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 31 Jul 2017 20:54:37 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 83830C22187; Mon, 31 Jul 2017 10:53:56 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 3BD35C21E42;\n\tMon, 31 Jul 2017 10:53:54 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 3DAB3C2216D; Mon, 31 Jul 2017 10:53:00 +0000 (UTC)","from mail-qk0-f171.google.com (mail-qk0-f171.google.com\n\t[209.85.220.171])\n\tby lists.denx.de (Postfix) with ESMTPS id B03B0C2215C\n\tfor <u-boot@lists.denx.de>; Mon, 31 Jul 2017 10:52:59 +0000 (UTC)","by mail-qk0-f171.google.com with SMTP id a77so48279837qkb.0\n\tfor <u-boot@lists.denx.de>; Mon, 31 Jul 2017 03:52:59 -0700 (PDT)","by 10.12.173.246 with HTTP; Mon, 31 Jul 2017 03:52:57 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc:content-transfer-encoding;\n\tbh=7x768aOj1k6IEP4Ew1qthbekVyjST8oO95HX3d1n1Fw=;\n\tb=s9ALvVbPs4x6L/PYouw1yjQ881Y3lwJj4/65pigWC2Ygli3x+s1vYyjDa+UceP5f6r\n\t8AAkQf1+C2r4cSLYbH7JCz0hX9F7eswykOnFgLGKvsagfqmY/DSaBtHxp9ZvbGPM0o/d\n\tcqBWlp79zQhNgKv8yNLm0h8YoMbDuAac52egQVti5dnkR52Qf5uQoCP3xQ3aBkQlXPNc\n\taf2n2rTCDEdNUA55lwpPZYrx8x7h9WeRX4KjtcD8J0WtrjFp8qwBGCKY/v5bYfN6ItM4\n\tNYlZqLHAlwc9FHdynWM4eYbvci6pokm3CP5lW1OYhwDhSTT9tuAQe7nq5R1sQcPNqEz0\n\ta2Dg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc:content-transfer-encoding;\n\tbh=7x768aOj1k6IEP4Ew1qthbekVyjST8oO95HX3d1n1Fw=;\n\tb=V7HEmApskuJjIjCIcu1fi3KVIasirZ/mEcsJqhpWnfp8jMuZIB9hMC8FzYL+mGYdz7\n\tgWTjL3xgLfRD72I1WNZpGqOApRDYSYT/ozLyFDtmM3NrLiJ/8P6MjSj9CrTf+9L0aief\n\tjuRQ69Q70ra3kw70CV2N5xyY1TSJRZ++FnEu5owuR2BJhj4IfPvT0m6Y3mNHpqOxkQfi\n\tzLpTx6VIloneOnxFExgA9d2vBRCA2RnCg+2zJ7eu4YQE1+j0rr1acAJqqcS89LVU1m4K\n\twAL+CQKDCCoPB58LzkXVt7JihVx8jpVp3aRPVuORFWFFOKQJJUzBSsrVEnMlJXdyN0es\n\tyqnA==","X-Gm-Message-State":"AIVw111ITaXQxDsReO5P9L4DGpYbmDCrxHL8a0SGtfWPYY1XMQpDwlAt\n\tePD4cI3pyJ0Y0HpDlNLOex7UIN6Izg==","X-Received":"by 10.55.165.9 with SMTP id o9mr21329557qke.346.1501498378387;\n\tMon, 31 Jul 2017 03:52:58 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>\n\t<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>\n\t<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>\n\t<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>\n\t<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>","From":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","Date":"Mon, 31 Jul 2017 12:52:57 +0200","Message-ID":"<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","To":"=?UTF-8?B?w4FsdmFybyBGZXJuw6FuZGV6IFJvamFz?= <noltari@gmail.com>","Cc":"\"u-boot@lists.denx.de\" <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1734093,"web_url":"http://patchwork.ozlabs.org/comment/1734093/","msgid":"<9759290.VcgNU1Dxdu@np-p-burton>","list_archive_url":null,"date":"2017-07-31T17:13:18","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":33698,"url":"http://patchwork.ozlabs.org/api/people/33698/","name":"Paul Burton","email":"paul.burton@imgtec.com"},"content":"On Monday, 31 July 2017 03:52:57 PDT Daniel Schwierzeck wrote:\n> 2017-07-30 18:04 GMT+02:00 Álvaro Fernández Rojas <noltari@gmail.com>:\n> > El 30/07/2017 a las 16:05, Daniel Schwierzeck escribió:\n> >> Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n> >>> I've been a bit busy lately and I couldn't test this until now, but I\n> >>> have to say that this commit breaks u-boot bmips support :(\n> >>> \n> >>> BTW, I tried this on several bmips boards (one of them is a Netgear\n> >>> CG3100D, which uses u-boot.bin instead of u-boot.elf)\n> >>> \n> >>> Do you have any idea on what could be hapenning?\n> >> \n> >> maybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\n> >> from u-boot-elf.o. But u-boot-elf.o should already contain the correct\n> >> .reloc section with the updated relocation entries so you don't need to\n> >> rerun the reloc-tool on u-boot.elf.\n> > \n> > I tried that and it doesn't work.\n> > However, I've just found out that if I remove the relocs call it boots\n> > again... https://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a\n> \n> I wonder how this can work. Even the u-boot.elf now contains\n> position-dependent code so that an update of the relocation entries is\n> required there too. Without the updated entries, U-Boot can't execute\n> after jumping from relocate_code() to board_init_r(). Did you use a\n> clean build if U-Boot?\n\nIndeed - without the .rel section being generated by the mips-relocs tool I'd \nexpect relocate_code() to either apply some bogus relocations or none at all \n(depending what's in the memory starting from __rel_start) and then, if it \ngets there at all, for the \"relocated\" U-Boot to fall over pretty quickly.\n\nFernandez - I don't suppose you're aware of an emulated version of any of the \nsupported bmips systems? That would be an easy way for me to take a look. FYI \nthe systems I use most (Boston & Malta) also use u-boot.bin or derivatives \nthereof & I'm sure the .rel section is copied across to it, so I doubt it has \nanything to do with binary formats.\n\nThanks,\n    Paul","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xLmJ419FLz9s65\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue,  1 Aug 2017 03:13:40 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 95E3CC21DF3; Mon, 31 Jul 2017 17:13:34 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 3302DC21C51;\n\tMon, 31 Jul 2017 17:13:32 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid DDABAC21C51; Mon, 31 Jul 2017 17:13:30 +0000 (UTC)","from imgpgp01.kl.imgtec.org (mailapp01.imgtec.com [195.59.15.196])\n\tby lists.denx.de (Postfix) with ESMTPS id 8E215C21C2B\n\tfor <u-boot@lists.denx.de>; Mon, 31 Jul 2017 17:13:30 +0000 (UTC)","from imgpgp01.kl.imgtec.org (imgpgp01.kl.imgtec.org [127.0.0.1])\n\tby imgpgp01.kl.imgtec.org (PGP Universal) with ESMTP id 4937841F8DE4; \n\tMon, 31 Jul 2017 19:25:03 +0100 (BST)","from mailapp01.imgtec.com ([10.100.180.241])\n\tby imgpgp01.kl.imgtec.org (PGP Universal service);\n\tMon, 31 Jul 2017 19:25:03 +0100","from hhmail02.hh.imgtec.org (unknown [10.100.10.20])\n\tby Forcepoint Email with ESMTPS id DFC4161C547D0;\n\tMon, 31 Jul 2017 18:13:25 +0100 (IST)","from HHMAIL-X.hh.imgtec.org (10.100.10.113) by\n\thhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server\n\t(TLS) id 14.3.294.0; Mon, 31 Jul 2017 18:13:29 +0100","from BAMAIL02.ba.imgtec.org (10.20.40.28) by HHMAIL-X.hh.imgtec.org\n\t(10.100.10.113) with Microsoft SMTP Server (TLS) id 14.3.294.0;\n\tMon, 31 Jul 2017 18:13:29 +0100","from np-p-burton.localnet (10.20.1.88) by bamail02.ba.imgtec.org\n\t(10.20.40.28) with Microsoft SMTP Server (TLS) id 14.3.266.1;\n\tMon, 31 Jul 2017 10:13:26 -0700"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE\n\tautolearn=unavailable autolearn_force=no version=3.4.0","X-PGP-Universal":"processed;\n\tby imgpgp01.kl.imgtec.org on Mon, 31 Jul 2017 19:25:03 +0100","From":"Paul Burton <paul.burton@imgtec.com>","To":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,\n\t=?ISO-8859-1?Q?=C1lvaro_Fern=E1ndez?= Rojas <noltari@gmail.com>","Date":"Mon, 31 Jul 2017 10:13:18 -0700","Message-ID":"<9759290.VcgNU1Dxdu@np-p-burton>","Organization":"Imagination Technologies","In-Reply-To":"<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>\n\t<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","MIME-Version":"1.0","X-Originating-IP":"[10.20.1.88]","X-ESG-ENCRYPT-TAG":"3d264444","Cc":"\"u-boot@lists.denx.de\" <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"multipart/mixed;\n\tboundary=\"===============5660530195066483455==\"","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1736419,"web_url":"http://patchwork.ozlabs.org/comment/1736419/","msgid":"<521fae68-9e81-802f-47ca-666fc78173df@gmail.com>","list_archive_url":null,"date":"2017-08-02T20:35:24","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":64520,"url":"http://patchwork.ozlabs.org/api/people/64520/","name":"Álvaro Fernández Rojas","email":"noltari@gmail.com"},"content":"Hi Daniel,\n\nEl 31/07/2017 a las 12:52, Daniel Schwierzeck escribió:\n> 2017-07-30 18:04 GMT+02:00 Álvaro Fernández Rojas <noltari@gmail.com>:\n>>\n>>\n>> El 30/07/2017 a las 16:05, Daniel Schwierzeck escribió:\n>>>\n>>>\n>>> Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n>>>> I've been a bit busy lately and I couldn't test this until now, but I have to say that this commit breaks u-boot bmips support :(\n>>>>\n>>>> BTW, I tried this on several bmips boards (one of them is a Netgear CG3100D, which uses u-boot.bin instead of u-boot.elf)\n>>>>\n>>>> Do you have any idea on what could be hapenning?\n>>>>\n>>>\n>>> maybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\n>>> from u-boot-elf.o. But u-boot-elf.o should already contain the correct\n>>> .reloc section with the updated relocation entries so you don't need to\n>>> rerun the reloc-tool on u-boot.elf.\n>>>\n>>\n>> I tried that and it doesn't work.\n>> However, I've just found out that if I remove the relocs call it boots again...\n>> https://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a\n> \n> I wonder how this can work. Even the u-boot.elf now contains\n> position-dependent code so that an update of the relocation entries is\n> required there too. Without the updated entries, U-Boot can't execute\n> after jumping from relocate_code() to board_init_r(). Did you use a\n> clean build if U-Boot?\n> \nYeah, I used a clean build of u-boot (upstream with just the patch mentioned before):\nhttps://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a#file-u-boot-log\n\nRegards, Álvaro.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"RQZ/LJQq\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xN4pj6B2jz9s78\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  3 Aug 2017 06:41:17 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 7F1E9C21DE5; Wed,  2 Aug 2017 20:38:16 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id CBBA9C21DE3;\n\tWed,  2 Aug 2017 20:35:43 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 06828C21C51; Wed,  2 Aug 2017 20:35:33 +0000 (UTC)","from mail-wm0-f44.google.com (mail-wm0-f44.google.com\n\t[74.125.82.44])\n\tby lists.denx.de (Postfix) with ESMTPS id 7CA76C21DB5\n\tfor <u-boot@lists.denx.de>; Wed,  2 Aug 2017 20:35:28 +0000 (UTC)","by mail-wm0-f44.google.com with SMTP id m85so2090413wma.1\n\tfor <u-boot@lists.denx.de>; Wed, 02 Aug 2017 13:35:28 -0700 (PDT)","from [192.168.1.10] (3.red-83-52-40.dynamicip.rima-tde.net.\n\t[83.52.40.3]) by smtp.gmail.com with ESMTPSA id\n\ti185sm114182wmf.34.2017.08.02.13.35.26\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 02 Aug 2017 13:35:26 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=tprkFqQDGZoLnaFsEA7uTNCy9b9m7Fj2pa4TpyEdmRw=;\n\tb=RQZ/LJQqf71uGbECVTLK8OwSyUAOrAClY+OxMmV1FrdMZs/qlyXJNict9UUHphJfbR\n\tfDQWOnt4uGdH1l55XhIByUQsgo5GRDuy1Qq7RvNuuVl5Z2X5OChF6SrWT7ibKpV+JY7r\n\tjREMH0lGnCClifdkwoiP7qg9+4vMW1CRRIKLxz7P86GAp14cQyYFvGRtGv2CGqoWedTR\n\t6KHmd+ZBdAwzP91RzuoYyIy6EbhnpbDqF2lh/j4DbPdovQizNRlRLvfapLxUldRUtxl6\n\tdnf4N1uoPE/BQjmWPqT1C99Fi24VEL4p5BRu71kaRP+2bFUBrMb6R9wtHiz5wUBBikrI\n\tJAXQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=tprkFqQDGZoLnaFsEA7uTNCy9b9m7Fj2pa4TpyEdmRw=;\n\tb=hdWyqsTVFCWDedaBzHukimjc9ZaXykMMVP0pRaYvQSs1t4X5w2VgSJ56Gvf/UzXvjc\n\t5CeIpgkzpBl/pYJIseUukXBg99b9OSZaaILUrWv5bbpmUMAeKnutf0YnND4dS2+sA25g\n\tKaH0FFa35VTYLNVxFXSxchtBocm09v5/0HENcjPeL4t5T60Mtzp6IcjRUqLMlBwD6lcp\n\tUlzbZ6XdXyptvI4+hYF6BFaZo2vmPRHP+kw9Xo57ok9BHSp0XjcRSdYaxDcdNYf8w4es\n\ttdp4DPgd47joxRHT8+AvFQu3yw573hwc/uBj6acQIru0ew7ezv6lUTppRwh7s0d7bnNw\n\t83zQ==","X-Gm-Message-State":"AIVw1101p6f9FvvTnwmHsoA3GF1DgwnpezA5IZcmEBx1oayatDgeYiuA\n\tiknW5VyYXLzT/QKR8pY=","X-Received":"by 10.28.94.13 with SMTP id s13mr4765503wmb.33.1501706127821;\n\tWed, 02 Aug 2017 13:35:27 -0700 (PDT)","To":"Daniel Schwierzeck <daniel.schwierzeck@gmail.com>","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<20170619185347.13959-1-paul.burton@imgtec.com>\n\t<46585f2e-ae8c-150c-f798-fcf72a30f22b@gmail.com>\n\t<3d5d22e5-c6e4-0d82-af64-3efa5d16dc15@gmail.com>\n\t<d4494168-c9e8-f130-8c43-9002da9c47cc@gmail.com>\n\t<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>\n\t<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","From":"=?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= <noltari@gmail.com>","Message-ID":"<521fae68-9e81-802f-47ca-666fc78173df@gmail.com>","Date":"Wed, 2 Aug 2017 22:35:24 +0200","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>","Cc":"\"u-boot@lists.denx.de\" <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1736441,"web_url":"http://patchwork.ozlabs.org/comment/1736441/","msgid":"<ed765540-c437-85a0-17db-e14935bc8e64@gmail.com>","list_archive_url":null,"date":"2017-08-02T20:40:53","subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","submitter":{"id":64520,"url":"http://patchwork.ozlabs.org/api/people/64520/","name":"Álvaro Fernández Rojas","email":"noltari@gmail.com"},"content":"Hi Paul,\n\nEl 31/07/2017 a las 19:13, Paul Burton escribió:\n> On Monday, 31 July 2017 03:52:57 PDT Daniel Schwierzeck wrote:\n>> 2017-07-30 18:04 GMT+02:00 Álvaro Fernández Rojas <noltari@gmail.com>:\n>>> El 30/07/2017 a las 16:05, Daniel Schwierzeck escribió:\n>>>> Am 30.07.2017 um 14:27 schrieb Álvaro Fernández Rojas:\n>>>>> I've been a bit busy lately and I couldn't test this until now, but I\n>>>>> have to say that this commit breaks u-boot bmips support :(\n>>>>>\n>>>>> BTW, I tried this on several bmips boards (one of them is a Netgear\n>>>>> CG3100D, which uses u-boot.bin instead of u-boot.elf)\n>>>>>\n>>>>> Do you have any idea on what could be hapenning?\n>>>>\n>>>> maybe you need to specify \"--emit-relocs\" too when linking u-boot.elf\n>>>> from u-boot-elf.o. But u-boot-elf.o should already contain the correct\n>>>> .reloc section with the updated relocation entries so you don't need to\n>>>> rerun the reloc-tool on u-boot.elf.\n>>>\n>>> I tried that and it doesn't work.\n>>> However, I've just found out that if I remove the relocs call it boots\n>>> again... https://gist.github.com/Noltari/ce3a6a9dda69e74caf7ba33c9c8ade9a\n>>\n>> I wonder how this can work. Even the u-boot.elf now contains\n>> position-dependent code so that an update of the relocation entries is\n>> required there too. Without the updated entries, U-Boot can't execute\n>> after jumping from relocate_code() to board_init_r(). Did you use a\n>> clean build if U-Boot?\n> \n> Indeed - without the .rel section being generated by the mips-relocs tool I'd \n> expect relocate_code() to either apply some bogus relocations or none at all \n> (depending what's in the memory starting from __rel_start) and then, if it \n> gets there at all, for the \"relocated\" U-Boot to fall over pretty quickly.\nIs it possible that CFE is taking care of that?\nFor what I've seen in old versions of CFE, it looks like it does some parsing of the .elf files:\nhttps://github.com/Noltari/cfe_bcm63xx/blob/master/cfe/cfe/main/cfe_ldr_elf.c\n\"This program parses ELF executables and loads them into memory\"\n\n> \n> Fernandez - I don't suppose you're aware of an emulated version of any of the \n> supported bmips systems? That would be an easy way for me to take a look. FYI \n> the systems I use most (Boston & Malta) also use u-boot.bin or derivatives \n> thereof & I'm sure the .rel section is copied across to it, so I doubt it has \n> anything to do with binary formats.\nNope, sorry but I've never emulated any bmips hardware...\n\n> \n> Thanks,\n>     Paul\n> \n\nRegards,\nÁlvaro.","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"lnYFXizL\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xN4yT66Hcz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  3 Aug 2017 06:48:01 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 960FAC21C5C; Wed,  2 Aug 2017 20:43:51 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 806A5C21D9A;\n\tWed,  2 Aug 2017 20:43:42 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 56F53C21DCC; Wed,  2 Aug 2017 20:40:57 +0000 (UTC)","from mail-wr0-f172.google.com (mail-wr0-f172.google.com\n\t[209.85.128.172])\n\tby lists.denx.de (Postfix) with ESMTPS id 32D27C21DD7\n\tfor <u-boot@lists.denx.de>; Wed,  2 Aug 2017 20:40:57 +0000 (UTC)","by mail-wr0-f172.google.com with SMTP id v105so1011785wrb.0\n\tfor <u-boot@lists.denx.de>; Wed, 02 Aug 2017 13:40:57 -0700 (PDT)","from [192.168.1.10] (3.red-83-52-40.dynamicip.rima-tde.net.\n\t[83.52.40.3]) by smtp.gmail.com with ESMTPSA id\n\ti32sm240246wra.5.2017.08.02.13.40.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 02 Aug 2017 13:40:55 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable\n\tautolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=subject:to:references:cc:from:message-id:date:user-agent\n\t:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=l5VVBxXat1cgpPcy4C0iBcgND+fffcVaUR2Fk/Ca07s=;\n\tb=lnYFXizLbSL33gRboWO15ufoIyJ8EQvTQEafBrjAd8mupkTEjb4PKuxPC7fijMoy5V\n\t8V/0yF1RZLgs3T2TV0bIE3mgoyZtw8A3hbhpQfbLWBIBxUpkDf/adxKWqbLaL8Hcax+k\n\t8o181aLiJoKimObOzmxQZtVz8NTL9xKF2CPBFQWjeyc83X9XLU2MgO05Mmos3zlvGt9N\n\tswJ8kKn2B1e3ifrjy1wuL8oz1STsipcZgmfjoOylOa4LlIJBjmbD4M/S7LHJdLcOV3vv\n\tRj42CGkQoAKlwRJY5LHt1C0ABpSfBZL4GlE3QvaV7IUlVAaqkcTc0efmuPJds5jjvGsF\n\t3LBw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:subject:to:references:cc:from:message-id:date\n\t:user-agent:mime-version:in-reply-to:content-transfer-encoding;\n\tbh=l5VVBxXat1cgpPcy4C0iBcgND+fffcVaUR2Fk/Ca07s=;\n\tb=T4yikm0ZVVyjLyc7B+gqB8LfusdpuYa6BNR3ezaponSLYM7PpFgyvzVMYgQlaUB0PG\n\tNy8xZx7GrHf3P1WByZcIE3e2ZLVSgTQw3gqn3ODx3EXU0bNG2Q6+r6r785et08Klog9u\n\tdivdjEinX3r1pvPq39tS24E2OBjuWrWkPLkklv8rbqIuSgcmCrMc9mzPzkPX8yeint8b\n\tA+1sOO3R62MZmxrLQv+wr4ZzrFp7nrNSqGn85jEsQm/t9JtLh2puTH1Frhq8MLsBZfq5\n\t+ts51bc0CPTDH+j5xKdRd4FNCN7+MvkZJ7LiLXDuDHWIbaJrSRTMUPcM1Ygp8F9h99qB\n\tqqBg==","X-Gm-Message-State":"AIVw1133a3S+EU6r5Kx/Oc8aTev/zwK7Hw0yDT9HIN9x2XVCtw0DcHA7\n\te13vpinhHuD2hvMikJc=","X-Received":"by 10.223.166.230 with SMTP id t93mr18002712wrc.39.1501706456598;\n\tWed, 02 Aug 2017 13:40:56 -0700 (PDT)","To":"Paul Burton <paul.burton@imgtec.com>,\n\tDaniel Schwierzeck <daniel.schwierzeck@gmail.com>","References":"<1610496.73fHGmXFmX@np-p-burton>\n\t<61f6e9a4-123d-9687-db2d-6264d5e7ae31@gmail.com>\n\t<CACUy__Xm7SYwBBJBCgnpPnA4DRn8Ah4nCtZGV=KLENF_JtH4wg@mail.gmail.com>\n\t<9759290.VcgNU1Dxdu@np-p-burton>","From":"=?UTF-8?Q?=c3=81lvaro_Fern=c3=a1ndez_Rojas?= <noltari@gmail.com>","Message-ID":"<ed765540-c437-85a0-17db-e14935bc8e64@gmail.com>","Date":"Wed, 2 Aug 2017 22:40:53 +0200","User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101\n\tThunderbird/45.8.0","MIME-Version":"1.0","In-Reply-To":"<9759290.VcgNU1Dxdu@np-p-burton>","Cc":"\"u-boot@lists.denx.de\" <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH v3 2/2] MIPS: Stop building position\n\tindependent code","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]