[PATCH 08/24] RISC-V sim: Add brk syscall.
Mike Frysinger
vapier@gentoo.org
Mon Apr 19 05:24:47 GMT 2021
On 17 Apr 2021 10:58, Jim Wilson wrote:
> Add endbrk field to cpu struct. Set it to highest section end address.
> Use it for the brk syscall support.
> ...
> + /* Set endbrk to highest section end address. */
> + phdr = elf_tdata (abfd)->phdr;
> + phnum = elf_elfheader (abfd)->e_phnum;
the commit message & comments say "sections", but the code isn't operating on
sections, it's operating on program headers which define "segments". i know
it sounds like i'm being pedantic, but i've seen a lot of ELF parsers that get
confused and use/mix terminology, and it gets hard to untangle the intentions
with the actual code. especially when digging through bug reports.
-mike
More information about the Gdb-patches
mailing list