Sunday, April 27, 2008

r57 with Standard Library Hashes

R57 includes a major new feature. A hashed function symbol library has been committed to the subversion repository. If I have a copy of a function, and you have that function in an example program, you can now recover it with a single command after initialization!

Consider the following example, wherein a stripped LED blinker is loaded and its symbols recovered.
karen% msp430-objdump -D blink.exe | m4s init
Reading library hashes.
Reading code.
karen% m4s .symbols.recover
karen% m4s .funcs
4000 .text
403a __ctors_end
403e _unexpected_
404c __nesc_atomic_start
4060 __nesc_atomic_end
4068 4068
4084 Msp430TimerCapComP
4094 Msp430TimerCapComP
40a4 Msp430TimerCapComP
40b4 40b4
40fa 40fa
4118 CC2420ControlM
411a 411a
41da SchedulerBasicP
4230 4230
432e TransformCounterC
43a4 Msp430TimerP
43b8 43b8
43dc 43dc
4568 MSP430ClockM
4584 MotePlatformC
459c 459c
45ea 45ea
46a2 46a2
475a TransformAlarmC
4798 AlarmToTimerC
47dc VirtualizeTimerC
482c 482c
48a2 48a2
4910 Msp430ClockP
497c SchedulerBasicP
4994 McuSleepC
4a58 __stop_progExec__
Revision 57 includes hashed symbols for TinyOS, Contiki, GNU's libc, and ImageCraft ICCV7's libc. If you have access to other libraries, please send me the file produced by m4s .contribute.lib after inputing the library.

(Note that msp430static only includes one-way hashes of library functions. This is more spartan than the fingerprint format used for privately-imported libraries, but it's necessary to comply with copyright law.)

--Travis Goodspeed
<travis at>

No comments: