[FULL DISCLAIMER: I HAD BOTH ONOKI'S AND HASHIRAMA'S PAGES WHEN CONDUCTING THIS THEORY, SO I AM GOING TO BE USING UNTESTED FACT-BASED THEORIES. THIS ALSO CONTAINS POTENTIAL SPOILERS!]
{Also this is a battle where both of them are in their prime}
let us begin...
Onoki (Kamizuru) The Tshuchikage of Iwagakure or the land hidden stone, the leader of the shinobi clan in his respected nation. Onoki was a renowned shinobi in his village and far beyond and this was because of his mastery of the only known kekkai tota 'Dust Release' or 'particle-style' (The link to dust release will be provided at the bottom). He is also known to have the kekkai Genkai lava release and almost complete mastery of earth release, as well as several other chakra nature.
Hashirama Senju a world-renowned shinobi who wields the title of 'God Of Shinobi'. Hashirama was the only living person to naturally bear the legendary kekkai Genkai 'Wood Release', Hashirama was extremely proficient in all chakra natures including yin and yang release. Hashirama also was able to use a special form of senjutsu that has not been seen anywhere else in the anime/manga, he was able to instantly enter sage mode allowing him to do techniques of very large proportions, such as 'Sage Art: Gate of the Great Gods' Which was able to incarcerate the Nine-Tails with ease. He was also the person who developed the hidden leaf village as the first Hokage.
Fight! The only reason i believe Onoki has a chance against hashirama is not because of his kekkai tota, but he mastery of two specific abilities. Added-Weight rock technique and Light-Weight rock technique; and this includes its stronger variations. For the arguments sake I will explain the basis of these abilities and how exactly they could counter hashirama, 'Earth Release: Ultralight-Weight Rock Technique' Is the Stronger variations of 'Light-Weight rock technique', which allows the user to decrease the weight of something several fold but on a much smaller scale (Ex. Onoki Uses thus ability to fly). Using the 'Ultralight technique' Onoki was able to carry 'Genbu island' or 'Turtle Island' for a large amount of time. I am bring this technique up because it may be able to counter and destroy hashirama's most versatile move the 'Sage Art: True Several Thousand Hands'. Onoki In his prime in theory be able to place his and/or a hand of clone onto this massive statue potentially stopping it in its path, using the 'Ultralight technique' He could reduce the mass of this statue lowering its weight several folds potentially using the its attack force against is. This is quite an easy concept, the statue would be brushing away at the terrain and because of its massive size there would be no pin-pointed target; But when I mean using it 'Attack Force' i mean potentially removing itself from the battlefield and going into the air being it will be several Several times less than its initial weight. And this technique was on par with the Nine-Tails so it's attack force is not laughing matter, Being the attack is airborne it would be easy for onoki to sleep behind and use the Heavy weight technique slamming it into the ground completely destroying the structure.
This was just an aspect of the theoretical battle, and i want to see other peoples idea's so i can potentially counter them... But then again there is no right answer.