Add wildcards to the input section names.
This fixes the script for use with the "-ffunction-sections
-fdata-sections -Wl,--gc-sections" options when compiling/linking.
Also, discard the .eh_frame section. This section is emitted by GCC 4.4,
but not 4.5. Discarding it doesn't appear to break anything. I suspect this is
used for C++ exception implementation.
I found this to be a problem when building with GCC 4.4 (arm-elf),
because the USB DFU demo exceeded the 8k I allowed for it.
Thanks to Gareth McMullin <gareth@blacksphere.co.nz> for the patch.
The C runtime wasn't initialized correctly (there was garbage in the data
and bss sections). Add a reset_handler which initializes these sections
before calling the application's main() function.
The initial stack pointer is also defined in the linker script, allowing the
application to override with a linker command line option
"-Wl,--defsym,_stack=0x20005000".
Thanks to Gareth McMullin <gareth@blacksphere.co.nz>.