1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-23 04:50:28 +02:00
guile/module/system
Andy Wingo 6756d265ed ELF refactor and consequent linker simplifications
* module/system/vm/elf.scm: Add commentary.
  (make-elf): Add a constructor similar to make-elf-segment and
  make-elf-section.
  (write-elf32-header, write-elf64-header, write-elf-header): Take an
  <elf> instead of all the fields separately.
  (<elf-segment>, <elf-section>): Add "index" property.  Adapt
  constructors accordingly.

* module/language/objcode/elf.scm (bytecode->elf): Arrange to set the
  section indexes when creating ELF sections.

* module/system/vm/linker.scm (fold-values): New helper.
  (alloc-segment, relocate-section-header): Arrange to set segment and
  section indexes.
  (find-shstrndx): New helper, replaces compute-sections-by-name.  Now
  that sections know their indexes, this is easier.
  (allocate-elf, write-elf): New helpers, factored out of link-elf.
  Easier now that sections have indexes.
  (link-elf): Simplify.  Check that the incoming objects have sensible
  numbers.

* test-suite/tests/linker.test: Update to set #:index on the linker
  objects.
2013-05-23 11:02: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 ELF refactor and consequent linker simplifications 2013-05-23 11:02: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