The Gemara (Bava Basra 21b) says that Yoav misread the passuk Deuteronomy 25:19 "Eradicate the memory of Amalek" as "Eradicate the males of Amalek" and thus only killed the males of Edom.
My question is simply like this: Why would he read the passuk of Amalek and apply it to Edom? There is no mitzvah to kill Edom?