'rock' is a noun in form, and when it's used to modify another noun like rock wall, it function as an adjective, which in this case makes 'rock' a substantive (a substitute).
 The wall, the one made of rock (noun), crumbled and fell from old age.
 The rock (adjective) wall crumbled and fell form old age.
Note, every word has a form -what it looks like - and a function - what it does.
Interested in Language