Re: [PATCH v3 09/19] unwind: Introduce sframe user space unwinding
From: Segher Boessenkool
Date: Fri Nov 01 2024 - 17:43:22 EST
Hi!
On Fri, Nov 01, 2024 at 12:48:00PM -0700, Josh Poimboeuf wrote:
> On Fri, Nov 01, 2024 at 12:35:13PM -0700, Josh Poimboeuf wrote:
> > On Fri, Nov 01, 2024 at 12:33:07PM -0700, Josh Poimboeuf wrote:
> > > On Fri, Nov 01, 2024 at 02:09:08PM -0500, Segher Boessenkool wrote:
> > > > On Thu, Oct 31, 2024 at 04:03:13PM -0700, Josh Poimboeuf wrote:
> > > > > Actually I just double checked and even the kernel's ELF loader assumes
> > > > > that each executable has only a single text start+end address pair.
> > > >
> > > > Huh? What makes you think that? There can be many executable PT_LOAD
> > > > segments in each and every binary.
> > >
> > > Right, but for executables (not shared libraries) the kernel seems to
> > > assume they're contiguous? See the 'start_code' and 'end_code'
> > > variables in load_elf_binary() load_elf_interp().
> >
> > Typo, see load_elf_binary (not load_elf_interp).
>
> Hm, actually AFAICT that's only for reporting things in sysfs/proc. So
> maybe it's assumed but not really "enforced".
Yes, this is copied to mm->start_code (etc.) This isn't used for
anything very important it seems, it seems to be a leftover from when we
only had really simple binfmts? For a.out it did actually make sense,
for example :-)
Segher