Markets log gains for 2nd day on buying in Reliance, HDFC Ba