then gil-galad and elendil passed into mordor and encompassed the stronghold of sauron ; and they laid siege to it for seven years , and suffered grievous loss by fire and by the darts and bolts of the enemy , and sauron sent many sorties against them .