01-coff-characteristics.sh (494B)
1 # Golden: COFF section characteristics decode for an x86_64 Windows 2 # .obj. Asserts that the Characteristics field is surfaced under -h 3 # and that the canonical IMAGE_SCN_* bits land in the tag column. 4 5 cat > t.c <<'EOF' 6 int main(void) { return 0; } 7 EOF 8 "$KIT" cc -target x86_64-windows -c t.c -o t.obj 9 "$KIT" objdump -h t.obj | awk ' 10 /file format/ {print; next} 11 /^Idx Name/ {print; next} 12 /^ *[0-9]+ \.text/ {print "section:", $2, $5} 13 /Characteristics:.*0x[0-9a-f]+/ {print "raw:", $NF; exit}'