and when they were arrayed they went to the great feast ; and they sat at the king 's table with gandalf , and king eomer of rohan , and the prince imrahil and all the chief captains ; and there also were gimli and legolas .