Build_linker_argsBuild linker arguments from dissector results.
After the dissector runs, OCaml object files have been partitioned and partially linked into partition object files. Passthrough files (C stubs and runtime libraries) are passed directly without partial linking because they may have sections like .gcc_except_table that don't work well with ld -r.
The original linker invocation combines:
After dissector processing:
The caller must NOT add ccobjs or runtime_libs again when using dissector output - they are already included in object_files.
val object_files : t -> string listReturns the object files for the final linker. This includes:
The caller should pass these files to the linker and NOT add ccobjs or runtime_libs separately.
val linker_script : t -> stringReturns the path to the generated linker script. This should be passed to the linker via -Wl,-T,<path> added to Clflags.all_ccopts.
val build : Dissector.Result.t -> tbuild result constructs linker arguments from a dissector result.
Returns the list of rewritten partition object files (with .rewritten suffix) and the linker script path.
val linker_script_flag : t -> stringlinker_script_flag t returns the linker flag for the linker script, suitable for adding to Clflags.all_ccopts. Returns "-Wl,-T,<path>".