1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-06 15:40:29 +02:00
guile/module/system/vm
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
..
assembler.scm linker: Linker object writer takes a single argument. 2023-01-17 17:49:05 +01:00
coverage.scm Add missing #:modules argument for coverage-data->lcov. 2022-06-16 10:01:06 +02:00
debug.scm Fix frame-call-representation for callees without closures 2019-11-27 15:04:55 +01:00
disassembler.scm disassembler: Show intrinsic name for 'call-' instructions. 2022-11-01 22:02:19 +01:00
dwarf.scm Rename "RTL" to "bytecode" 2013-12-02 21:31:47 +01:00
elf.scm elf: Add missing argument in 'elf-segment'. 2015-03-30 15:19:58 +02:00
frame.scm Avoid 'frame-local-ref' errors when printing backtrace. 2022-11-29 11:53:54 +01:00
inspect.scm Remove assembly language. 2013-11-08 16:45:10 +01:00
linker.scm linker: Do not store entire ELF in memory when writing to a file. 2023-01-17 17:49:05 +01:00
loader.scm Rename objcodes?.{scm,c,h} to loader.{scm,c,h} 2013-11-19 21:45:07 +01:00
program.scm Add instrumentation to VM builtins 2018-08-17 08:50:33 +02:00
trace.scm Fix trace-calls-to-procedure 2021-05-19 16:41:30 +02:00
trap-state.scm No more VM objects visible to Scheme 2013-11-21 16:45:03 +01:00
traps.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00
vm.scm VM manages hook sets itself 2018-09-14 08:52:24 +02:00