 : with-mapped-elf ( path quot -- )
     '[
         address>> <elf> @
-    ] with-mapped-file ; inline
+    ] with-mapped-file-reader ; inline

TUPLE: symbol name elf-header sym data ;

GENERIC: sections ( obj -- sections )
    
: <elf> ( c-ptr -- elf )
    elf-header elf boa ;


        first2 :> ( name sym )
        name section elf-header>> sym f symbol boa
    ] { } map-as ;

:: symbol-data ( symbol -- data )
    symbol [ elf-header>> ] [ sym>> st_value>> ] bi virtual-address-segment :> segment
    symbol sym>> st_value>> segment p_vaddr>> - segment p_offset>> + :> faddress
