Date: Tue, 2 Mar 2021 20:37:24 +0100 From: Paul Floyd <pjfloyd@wanadoo.fr> To: "toolchain@freebsd.org" <toolchain@FreeBSD.org> Subject: Re: clang options for load segments Message-ID: <89794bb8-5e97-36a7-0b6a-fa2eaf76a72a@wanadoo.fr> In-Reply-To: <4D81BCDE-ECBC-49D8-BF17-38E334141FE0@FreeBSD.org> References: <fb3e3660-a6c0-c8ce-5055-624cde7ce95c@wanadoo.fr> <4D81BCDE-ECBC-49D8-BF17-38E334141FE0@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/2/21 7:31 PM, Dimitry Andric wrote: [snip - history of change] >> I will carry on looking for a proper solution. In the meantime, are there any flags to revert to the previous behaviour >> and only generate a single RW LOAD segment? > I think valgrind should be fixed to able to cope with additional > segments, but I haven't seen valgrind working on FreeBSD for years now, > so I am not going to hold my breath. :) I'll work on fixing it in Valgrind, but that is likely to be fair amount of work. No need to hold your breath. Concerning the FreeBSD port I've been working on Valgrind on FreeBSD for about a year or so and now it's not too far from working as well on FreeBSD as it does on Linux*. Either install the devel/valgrind-devel package (note: not devel/valgrind) or even better build and install from my github repo https://github.com/paulfloyd/freebsd_valgrind. I have a commit bit for upstream Valgrind and am working on integrating FreeBSD support in the 'official' Valgrind. This probably won't be in the next release, 3.17, due soon, but I hope that it gets into the next one (3.17.1 or 3.18). And I'm always on the lookout for any user feedback :-) . > > That said, you can attempt to link your executables with -z norelro (or > -Wl,-z,norelro via the compiler driver). If there is no PT_GNU_RELRO > header, lld will not split the segments. This seems to do the job as a workaround, thanks. A+ Paul * rust, OMP, clang debuginfo and some signal issues being the exceptions that I'm aware of
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89794bb8-5e97-36a7-0b6a-fa2eaf76a72a>