• Alessandro Rubini's avatar
    userspace/tools: allow load-lm32 to set variables. · a90e1542
    Alessandro Rubini authored
    This allos to write and read variable while loading rt_cpu.elf.
    You can read a variable at run time, by not loading the elf file.
    To do this use -n to "not" load the file:
    
       load-lm32 -n rt_cpu.elf pstate=
    
    We still need the file to read the symbol table.  So, <var>= reads
    the variable, and <write>=<value> changes it. You can pass several
    such actions on the same command line. Please note that you can't
    change variables in the BSS section, which is zeroed at run time.
    
    All symbols are trated as 32-bit integer values, so this is not really
    generic enough for everything:
    
      wrs-192.168.16.9# load-lm32 -n rt_cpu.elf memset=
      memset = 134253659 (0x08008c5b)
    Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
    a90e1542
load-lm32.c 8.09 KB