Malaysia is loed on the Sunda shelf, and is tectonically oldest rocks in the country date from 540 million years ago, and are mostly most common kind of rock is limestone that formed during the Paleozoic that had accreted in East Malaysia during the Tertiary period later eroded, forming basins of sedimentary rocks that are rich in oil .