1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-22 20:40:29 +02:00
guile/module/system
Andy Wingo d4da9ba9c0 refactor linker to lay out ELF files and memory in the same way
* 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.

  (relocate-section-header, allocate-segment): 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.

  (link-elf): Refactor to use the new interfaces.

* test-suite/tests/linker.test: Update to expect the additional sections
  for the header and section table.
2013-05-23 12:44:02 +02:00
..
base use chmod portably in (system base compile) 2013-03-10 20:12:09 +01:00
repl Merge remote-tracking branch 'origin/stable-2.0' 2013-04-14 02:48:33 -04:00
vm refactor linker to lay out ELF files and memory in the same way 2013-05-23 12:44:02 +02:00
foreign.scm Merge remote-tracking branch 'origin/stable-2.0' 2013-02-18 17:59:38 +01:00
xref.scm system xref maintains source mapping for nested procedures too 2010-09-24 13:24:48 +02:00