1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00
guile/module/language
Ludovic Courtès 3cd64feb2e linker: Do not store entire ELF in memory when writing to a file.
This reduces the amount of memory that needs to be allocated while
writing the ELF file to disk.

Note: We're abusing #:page-aligned? in 'link-elf' to choose whether to
return a bytevector or a procedure.

* module/system/vm/linker.scm (process-reloc): Subtract SECTION-OFFSET
when writing to BV.
(write-linker-object): Pass BV directly to the linker object writer.
(link-elf): When PAGE-ALIGNED? is false, call 'bytevector-slice' from
here.  When it is true, return a procedure that takes a port and writes
to it, without having to allocate a bytevector for the whole ELF
container.
* module/language/bytecode/spec.scm (bytecode->value): Handle X being a
procedure instead of a bytevector.
(bytecode) <#:printer>: Likewise.
* test-suite/tests/linker.test (link-elf-with-one-main-section): Pass
 #:page-aligned? #f.
2023-01-17 17:49:05 +01:00
..
brainfuck Add compiler chooser implementation; fix bugs with previous commit 2020-05-08 22:56:37 +02:00
bytecode linker: Do not store entire ELF in memory when writing to a file. 2023-01-17 17:49:05 +01:00
cps Add -Ooptimize-known-return-types at -O2 2021-11-15 15:32:54 +01:00
ecmascript Deprecate passing a non-zero size to make-module 2019-09-27 22:57:38 +02:00
elisp Mark some elisp runtime modules as non-declarative 2021-04-21 22:41:12 +02:00
scheme Read-in-scheme replaces boot "read" definition 2021-03-03 17:08:55 +01:00
tree-il Do not expand 'make-vector' primcall with wrong number of arguments. 2023-01-16 15:33:18 +01:00
value Add 'for-humans?' flag to <language> specifications. 2013-01-27 10:16:40 -05:00
bytecode.scm Add sign-extending make-immediate instruction 2020-07-30 17:36:11 +02:00
cps.scm Allow $kargs as entry of $kfun 2021-04-21 22:41:12 +02:00
tree-il.scm psyntax: Pass source vectors to tree-il constructors. 2022-02-07 12:23:35 +01:00