Simplify the code to record section hash.