From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: [PATCH 4/6] refactor linker to lay out ELF files and memory in the same way
Date: Wed, 22 May 2013 22:56:19 +0200 [thread overview]
Message-ID: <87r4gy7mz0.fsf@gnu.org> (raw)
In-Reply-To: 1368889540-27139-5-git-send-email-wingo@pobox.com
This goes beyond my ELF capabilities, so can’t really comment on this.
Style comments:
Andy Wingo <wingo@pobox.com> skribis:
> * module/system/vm/linker.scm (make-linker-object):
> (linker-object-section-symbol):
> (linker-object-symbols*): Create a symbol to the start of a linker
> object. Hide it from the external linker-object-symbols* accessor.
>
> (segment-kind, count-segments): Sections without SHF_ALLOC don't get
> segments.
> (collate-objects-into-segments): Allow for #f segment types. If two
> sections have the same type and flags, leave them in the same order.
>
> (align): Allow for 0 alignment.
>
> (add-elf-objects): New helper: puts the ELF data structures (header,
> segment table, and section table) in sections of their own. This
> lends a nice clarity and conceptual unity to the linker.
Please move the descriptions as docstrings.
> (relocate-section-header, alloc-objects): Lay out segments with
> congruent, contiguous addresses, so that we can just mmap the file and
> if debugging sections that are not in segments are present, they can
> be lazily paged in if needed by the kernel's VM system.
Nice. Could you move this comment in the code?
> ;; objects ::= list of <linker-object>
> -;; => 3 values: ELF header, program headers, objects
> +;;
> +;; => 3 values:
> +;; file size
> +;; objects with allocated memory address and file offset
> +;; symbol table
> +;;
> (define (allocate-elf objects page-aligned? endianness word-size)
What does it do?
Ludo’.
next prev parent reply other threads:[~2013-05-22 20:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-18 15:05 wip-linker: Refactor ELF linker and loader Andy Wingo
2013-05-18 15:05 ` [PATCH 1/6] split linker out of elf module Andy Wingo
2013-05-22 20:39 ` Ludovic Courtès
2013-05-23 7:26 ` Andy Wingo
2013-05-18 15:05 ` [PATCH 2/6] ELF refactor and consequent linker simplifications Andy Wingo
2013-05-22 20:44 ` Ludovic Courtès
2013-05-23 8:47 ` Andy Wingo
2013-05-23 10:27 ` Ludovic Courtès
2013-05-18 15:05 ` [PATCH 3/6] elf: add accessors for header members that might need relocation Andy Wingo
2013-05-22 20:45 ` Ludovic Courtès
2013-05-18 15:05 ` [PATCH 4/6] refactor linker to lay out ELF files and memory in the same way Andy Wingo
2013-05-22 20:56 ` Ludovic Courtès [this message]
2013-05-23 10:46 ` Andy Wingo
2013-05-23 11:59 ` Ludovic Courtès
2013-05-18 15:05 ` [PATCH 5/6] refactor and simplify ELF loader in objcodes.c Andy Wingo
2013-05-22 21:06 ` Ludovic Courtès
2013-05-23 10:58 ` Andy Wingo
2013-05-23 20:35 ` Ludovic Courtès
2013-05-24 14:49 ` Andy Wingo
2013-05-24 15:37 ` Ludovic Courtès
2013-05-18 15:05 ` [PATCH 6/6] add (find-mapped-elf-image) procedure to (system vm objcode) module Andy Wingo
2013-05-22 21:09 ` Ludovic Courtès
2013-05-22 21:13 ` wip-linker: Refactor ELF linker and loader Ludovic Courtès
2013-05-23 7:22 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r4gy7mz0.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).