package linksem
A formalisation of the core ELF and DWARF file formats written in Lem
Install
Dune Dependency
Authors
Maintainers
Sources
0.8.tar.gz
md5=2075c56715539b3b8f54ae65cc808b8c
sha512=f7c16e4036a1440a6a8d13707a43f0f9f9db0c68489215f948cc300b6a164dba5bf852e58f89503e9d9f38180ee658d9478156ca1a1ef64d6861eec5f9cf43d2
doc/src/linksem_zarith/ldconfig.ml.html
Source file ldconfig.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
(*Generated by Lem from ldconfig.lem.*) open Lem_basic_classes open Lem_bool open Lem_list open Lem_string open Byte_sequence open Error open Filesystem open Missing_pervasives (*val read_ldconfig_paths : string -> error (list string)*) let read_ldconfig_paths root:((string)list)error= ( (* Here we assume that /etc/ld.so.conf only includes /etc/ld.so.conf.d/*.conf. This seems to be the case on most systems. *) (* TODO: parse /etc/ld.so.conf *) (* TODO: on FreeBSD there's /etc/libmap.conf instead *)let config_dirname = "/etc/ld.so.conf.d" in (* TODO: some systems have "/lib64" and "/usr/lib64" as default dirs *) let default_dirs = (["/usr/lib"; "/lib"]) in if not (Sys.file_exists (root ^ config_dirname)) then return default_dirs else bind (Filesystem_wrapper.readdir (root ^ config_dirname)) (fun filenames -> Error.foldM (fun acc filename1 -> bind (Byte_sequence.acquire (root ^ (config_dirname ^ ("/" ^ filename1)))) (fun bs -> let s = (Byte_sequence.string_of_byte_sequence bs) in let dirs = (List.filter (fun dir -> not (dir = "") && not ((String.get dir 0) = '#') ) (Ml_bindings.split_string_on_char s '\n')) in return ( List.rev_append (List.rev dirs) acc)) ) default_dirs filenames)) (*val parse_runpath : string -> string -> list string*) let parse_runpath runpath object_path:(string)list= (let object_dirname = (Filesystem_wrapper.dirname object_path) in let l = (Ml_bindings.split_string_on_char runpath ':') in Lem_list.map (fun p -> let p = (Ml_bindings.string_replace p "$ORIGIN" object_dirname) in let p = (Ml_bindings.string_replace p "${ORIGIN}" object_dirname) in (* TODO: 64-bit hardcoded *) let p = (Ml_bindings.string_replace p "$LIB" "lib64") in let p = (Ml_bindings.string_replace p "${LIB}" "lib64") in p ) l)
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>