Just like the guy who's arm was trapped between a boulder and a rock wall; Although his supplies were limited, you still need food and water, and you need to be able to go to the bathroom. But be sure you have good knives and make sure you grab AT LEAST one Swiss Army knife just in case you need to cut off a limb. :]
If there is ample breathing air, then it is possible to survive under the rock. You will also be required to have water and food to help the body to keep on functioning. If you are stuck and it is unplanned, it can be rather hard to survive under the rock.
you need to stay hydrated most of all and also be able to breathe Then you also need to eat something and as long as the rock isn't crushing any major parts of the body you could survive. the guy in the movie struggled through every moment but was able to stay alive because he did/had all those things right.