05-rename-section-rv64.sh (382B)
1 # rv64 cross-compile: rename .text section in an ELF object. Mirrors 2 # 01-rename-section but exercises the ELF/rv64 path. 3 4 cat > smoke.c <<'EOF' 5 int foo(void) { return 1; } 6 EOF 7 "$KIT" cc -target riscv64-linux -c smoke.c -o smoke.o 8 "$KIT" objcopy --rename-section=.text=.mytext smoke.o smoke.r.o 9 "$KIT" objdump -h smoke.r.o | awk '/^ *[0-9]+ /{print $2}' | grep -E '^\.[a-z]' | sort