Ok, Keil, ARM and IAR compilers have tons of good tools to aid you to come up with the startup code and scripts for memory mapping, but guess what ? The documentation for the GNU ARM compiler is practically inexistent for free. Unless you buy a book called "Embedded Systems Design on a shoestring", which is very expensive btw, you will not have many references to figure out how to write the whole thing from scratch. Other day I was just surging around and found this.
Or in simples words, the article just explains it all for free and fun. I just gave you this link, scroll down the page and check the links to all the parts, print them all and have fun.