Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Feb 2020 16:31:27 +0100
From:      Paul Floyd <pjfloyd@wanadoo.fr>
To:        freebsd-toolchain@freebsd.org
Subject:   RO Elf program headers
Message-ID:  <9AAE92C0-4FD7-43DF-A805-EFEE7EA06B56@wanadoo.fr>

next in thread | raw e-mail | index | archive | help
Hi

I=E2=80=99ve been working on getting Valgrind to work again on FreeBSD.

Probably the biggest problem at the moment is that Valgrind doesn=E2=80=99=
t (yet) handle the read-only program headers.

If I run =E2=80=9Creadelf -l libc++.so.1.0=E2=80=9D on Linux I see two =
LOAD headers, the first one =E2=80=9CR E=E2=80=9D (read-execute) and the =
second one =E2=80=9CRW=E2=80=9D (read-write). If I do the same on =
FreeBSD then I see a third program header which is =E2=80=9CR=E2=80=9D =
(read-only), before the other two.

My questions are
- Does anyone know when this extra header was added? (I assume that it =
was added sometime in the past 5 years or so)
- What is in these segments, and is it safe to assume that multiple =
shared libraries can map the same RO content to the same address?

A+
Paul=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9AAE92C0-4FD7-43DF-A805-EFEE7EA06B56>