let names = List.filter_map (
fun (name, sym_value) ->
let f c = tokens.(Char.code c) in
- let name' = String.replace_chars f name in
- (*printf "%S -> %S\n" name name';*)
+ let name = String.replace_chars f name in
(* First character in uncompressed output is the symbol
- * type, eg. 'T'/'t' for text etc. Since we will never
- * be using functions, and since some functions (eg.
- * con_start) overlap with data symbols, drop functions.
+ * type, eg. 'T'/'t' for text etc.
*)
- let typ = name'.[0] in
- if typ = 't' || typ = 'T' then None
- else (
- let name' = String.sub name' 1 (String.length name' - 1) in
- Some (name', sym_value)
- )
+ (* NOTE: Symbol names are NOT unique
+ * (eg. 'con_start' is both a function and data in
+ * some kernels). XXX We need to handle this situation
+ * better.
+ *)
+ (*let typ = name.[0] in*)
+ let name = String.sub name 1 (String.length name - 1) in
+ (*printf "%S -> %Lx\n" name sym_value;*)
+ Some (name, sym_value)
) compressed_names in
let lookup_ksym name =