01-sections-text-only.sh (394B)
1 # Golden: section header list for a minimal rv64 ELF. 2 # Asserts elf64-riscv64 format detection and the .text shape. 3 4 cat > t.c <<'EOF' 5 int f(int x) { return x + 1; } 6 EOF 7 "$KIT" cc -target riscv64-linux -c t.c -o t.o 8 "$KIT" objdump -h t.o | awk '/file format/ {print; next} 9 /^Idx Name/ {print; next} 10 /^ *[0-9]+ \.text/ {print $2, $5}'