| .. | .. |
|---|
| 31 | 31 | # level entry code (boot, interrupt vectors, etc) until r2 is set up. This |
|---|
| 32 | 32 | # could cause the kernel to die in early boot. |
|---|
| 33 | 33 | |
|---|
| 34 | | -# Turn this on if you want more debug output: |
|---|
| 35 | | -# set -x |
|---|
| 34 | +# Allow for verbose output |
|---|
| 35 | +if [ "$V" = "1" ]; then |
|---|
| 36 | + set -x |
|---|
| 37 | +fi |
|---|
| 36 | 38 | |
|---|
| 37 | 39 | if [ $# -lt 2 ]; then |
|---|
| 38 | 40 | echo "$0 [path to nm] [path to vmlinux]" 1>&2 |
|---|
| .. | .. |
|---|
| 44 | 46 | vmlinux="$2" |
|---|
| 45 | 47 | |
|---|
| 46 | 48 | # gcc-4.6-era toolchain make _stext an A (absolute) symbol rather than T |
|---|
| 47 | | -$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" -m4 > .tmp_symbols.txt |
|---|
| 49 | +$nm "$vmlinux" | grep -e " [TA] _stext$" -e " t start_first_256B$" -e " a text_start$" -e " t start_text$" > .tmp_symbols.txt |
|---|
| 48 | 50 | |
|---|
| 49 | 51 | |
|---|
| 50 | 52 | vma=$(cat .tmp_symbols.txt | grep -e " [TA] _stext$" | cut -d' ' -f1) |
|---|