From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from second.openwall.net (second.openwall.net [193.110.157.125]) by inbox.vuxu.org (Postfix) with SMTP id 199F62D1D9 for ; Sat, 24 Aug 2024 00:15:55 +0200 (CEST) Received: (qmail 16312 invoked by uid 550); 23 Aug 2024 22:15:48 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 16278 invoked from network); 23 Aug 2024 22:15:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1724451339; x=1725056139; i=j.neuschaefer@gmx.net; bh=paGp0WKaEbasNKAaskPRDh017qz5ocTTl1naIKrlS7A=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To: cc:content-transfer-encoding:content-type:date:from:message-id: mime-version:reply-to:subject:to; b=aDx8cjCc5fx5eG53DQaLhTiAqQWCPj2AFtVvZNgO/gP/SbywQHc1iR7SPf+IxsOO 4c5umYjS4oLSdp+bO85NrUeWow6S22A9WBdiQal8y/Tp2lycFuZ8hZltV8kTlMt37 BCLZzfM/DLCWVxADE2KSaMgg+9gXZ8oN3O4asTNbiyTBVsKWXl2eUA9/Jy6sVIrYc ZxPtAa+uBdTg7GUie09z3LwVo1FGmaHg+kKw0AuQ1OjGY8lmWqiU1rUwBF/OoSq28 Ka/z8arbgAZ+58p4LPkZGqYn3KgRUaxjS42rR1MbymFPZPQBpkYmF5aiWOowftcRt ac8jg4HJWFaUxCw2Fg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Date: Sat, 24 Aug 2024 00:15:37 +0200 From: =?utf-8?Q?J=2E_Neusch=C3=A4fer?= To: Rich Felker Cc: =?utf-8?Q?J=2E_Neusch=C3=A4fer?= , lvm-devel@lists.linux.dev, buildroot@buildroot.org, musl@lists.openwall.com Message-ID: References: <20240811-microblaze-v1-1-2781ba343e75@gmx.net> <20240811215226.GK10433@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240811215226.GK10433@brightrain.aerifal.cx> X-Provags-ID: V03:K1:tL8F7XtaymuUwsRVWAvHgy0za+FCFEAPy3LV78xd+VvCgCKJyYm bA9rOlBN3tDEQ+xU9MLRAGZM4qGUcf8HfXFEzmSVeafn0ECrwG2kEozbv9RyE3BRGz/w4M5 kXHFQ4VVgBQhBfl+1Y723qt6DkC+aXSGafaYCl7N4kh7I1R49bbR3e4jxfyLcGbvlhLhzdQ 3ymTSLMT9ydMuNd5cqUyQ== UI-OutboundReport: notjunk:1;M01:P0:l+TDhp1UiSQ=;rYAtVOIChtUcfmzLl3j5OUIM9Gp KldbPaar7/lSLyMKxwoZjIRuOd3wy+gatTHGfZ0K7ga+6ZN15gF4J0KvF0hwnDGioDDngwmlx gvPeyLZDbiNM5vLZevUr5Di+Jq9nxPMJQzI7NkEU99GB0gGSi5SWq5rVlgq9vq2ubaP7mZVCN Doia2He3sSvsbXJP8fmsl8T8zoucsDM9rq+9B8DsNMMQxY0fu/RnAfFmSpSKVaMS9mnIBca/3 dScHjwD43RL32UrMyxXFyND2S6BSsrRlaF41kdAyq4g6oh3Vyy0ln2cBk4O/u3EJhR8rDSNFW iFcBTHDfvtPzN9hVPQX72akQLrGJFG0+ivwmPXYoSfl1UtIh6XEYMWLzdyypgs2/PpozZ0rvD Q5Qlg++OHloc+vGB6Md+LyjGdbiOysVkpg/vkdWdNKdsyavriKdJ9APFkvDpyocaec06/nNKy N8QjjO361yek77+/CjJXcjzhf/lBY8pzqp23bo+K0+gXURma+k5jqLdwmhLNemt4qZDV1ZKXB 6FKFk504skt0N+AKhCz0ktPEmaBoOjn+iIRL/sUlgdXJJwHBc1r+v3vIObchI+Nd94psVBUmn JW9RgF85BgDI/nzjRwDyH3b6F5RIkSXqzPSTs6GYy1vIlzfGIGkHu2/hlCS4h3+U/8J/NTiJf vfuk0mXNLCoDcDiWqppNhB/Y+97u8naa8rfYAd+GnNdonVTyG4HBsJitViGoYYOQxFcl5sIWB AafeDjSE9NUAUdttTVXVhMeID9YTi20AWv6gpSen38T+oDHCA9j10kUpCJgO8KC+Wk7YSyIFm jXZVpJxVrRydL+1RGE7z8jtXyltAmZk2lZjCi3NtlwLmkBHybpsNFvRt5tgGhSOgtG5ZtI+8X EQazU3fF4tcZn/w== Subject: Re: [musl] [PATCH lvm2] acinclude.m4: Link when trying CCFLAGS On Sun, Aug 11, 2024 at 05:52:29PM -0400, Rich Felker wrote: > On Sun, Aug 11, 2024 at 11:04:38AM +0200, J. Neusch=C3=A4fer wrote: > > Through a build failure of LVM2 on musl-libc 1.2.5 in the Buildroot > > autobuild service[1], I noticed that musl-libc's Scrt1 for microblaze > > produces a relocation targeting the .text section, which subsequently > > leads to a crash at run-time because musl-libc does not support > > textrels[2]. Buildroot uses the "-z text" linker option to catch > > textrels early, on musl-libc. > > > > The error can be reduced to the following test case: > > > > $ cat hello.c > > #include > > int main(void) { puts("Hello world!"); return 0; } > > $ host/bin/microblaze-buildroot-linux-musl-gcc hello.c -z text -pie = -fPIC > > microblaze-buildroot-linux-musl/bin/ld: microblaze-buildroot-linux-m= usl/sysroot/lib/Scrt1.o: > > warning: relocation against `_start_c' in read-only section `.text= ' > > microblaze-buildroot-linux-musl/bin/ld: read-only segment has dynami= c relocations > > collect2: error: ld returned 1 exit status [...] > > No objection, but this is a bug in the tooling (ld) that we could also > avoid on the musl side. So there are probably 3 places things should > be changed here. > > Rich I finally got around to testing your musl patch (http://0x0.st/XWB9.diff - "use hidden visibility for C entry point function _start_c"). It solves the immediate problem for microblaze(el) as far as I can see. I'm not familiar enough with linker intricacies to write a binutils/ld bug report though. =2D- jn