On 2014-09-23, Wylder Keane <wylder.ke...@gmail.com> wrote: > I've been using the new msp430-elf-g++ released on 2014-09-03 to build and > debug, and while attempting to reduce the binary size I've added the > following arguments for the compilation and linking phases (except > gc-sections is linker only). > > -fdata-sections -ffunction-section -nodefaultlibs --gc-sections > > While greatly reducing the code space, it also seems to think main() isn't > a root and optimizes it away... needless to say this isn't very good.
A would guess that the -nodefaultlibs option is preventing the inclusion of the standard startup code, which is what normally calls main(). That unresolved reference to main is what would normally cause the linker to pull in main. You can probably work around it by passing -u main to the linker, but unless there is startup code calling main it won't really matter whether it's linked in or not. -- Grant Edwards grant.b.edwards Yow! Should I do my BOBBIE at VINTON medley? gmail.com ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Mspgcc-users mailing list Mspgcc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mspgcc-users