7 Commits

Author SHA1 Message Date
Uwe Hermann
af61aaef21 Minor ld script changes.
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.
2010-12-17 05:50:00 +01:00
Uwe Hermann
1621fde1f4 Add proper C runtime init, add reset handler.
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>.
2010-10-19 02:00:28 +02:00
Piotr Esden-Tempski
4935a0ddd8 Moved vector_table to the library. 2010-01-25 17:29:06 +01:00
Uwe Hermann
1f07553863 Fix comment. 2009-07-25 00:28:07 +02:00
Uwe Hermann
cfd87f6b9d Add mini ld scripts in the example which include the global one. 2009-07-25 00:05:06 +02:00
Uwe Hermann
428e328b7e Install the ld script upon 'make install'. 2009-07-24 23:30:36 +02:00
Uwe Hermann
50ba77bea9 Factor out ld scripts into one common script in the lib. 2009-07-24 23:19:44 +02:00