also fix all warnings and use -Werror
LD interprets "a.o b.o c.o(sectionexpr)" as 3 separate input commands, i.e. it will copy all the sections from a.o, then b.o and the sections matching (sectionexpr) from c.o in that order; (a.o b.o c.o)(sectionexpr) results in a syntax error.