Module Extract_relocations
Extract relocations from partially-linked object files.
This module reads ELF object files and extracts relocations that need to be converted to use an intermediate PLT or GOT when linking with the dissector code model.
module Relocation_entry : sig ... endInformation about a single relocation that needs conversion.
val convert_to_plt :
Extract_relocations.t ->
Extract_relocations.Relocation_entry.t listReturns relocations with type R_X86_64_PLT32 that need PLT entries.
val convert_to_got :
Extract_relocations.t ->
Extract_relocations.Relocation_entry.t listReturns relocations with type R_X86_64_REX_GOTPCRELX that need GOT entries.
val extract :
(module Compiler_owee.Unix_intf.S) ->
filename:string ->
Extract_relocations.textract unix ~filename reads the ELF object file at filename and extracts relocations from the .rela.text section that need to be converted for the medium code model.
Returns the lists of PLT32 and REX_GOTPCRELX relocations found.
val extract_from_linked_partitions :
(module Compiler_owee.Unix_intf.S) ->
Partition.Linked.t list ->
Extract_relocations.textract_from_linked_partitions unix linked_partitions extracts relocations from all the partially-linked object files.
Returns combined relocation information from all partitions.