Re: msp430-elf-g++ optimizing out main()
Wylder Keane <[email protected]> Wed, 24 Sep 2014 13:09:02 -0700
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.user |
|---|---|
| Message-ID | <CAP1=f4zgYSyvDQ_qZ=DQpjJzTQZSqMs_evZ5w+aRJe7URmENCg@mail.gmail.com> |
Looking at the disassembly again, the reference to main is not there, it seems to strip it out. If you look at the crt0.S file it has a reference to it though so I'm slightly confused by why it is removed. From what I understood the -nodefaultlibs flag only removed default libraries, not startup code, whereas -nostdlib removed both. I tried the minrt flag with no luck, exception code is still linked in. Is it possible the -fno-exceptions flag isn't making it through? It also seems like i'm getting some cio calls and malloc despite not calling those functions anywhere... Also, I've encountered the (known) issue where -ffunction-sections breaks debugging symbols, is there any change of this being fixed in the future or is it too obscure? On Wed, Sep 24, 2014 at 7:27 AM, Grant Edwards <[email protected]> wrote: > On 2014-09-23, Wylder Keane <[email protected]> wrote: > > > Interesting that main() is not considered a root with gcc. The crt0.S > start > > code which references main is in the binary that is generated event with > > the nodefaultlibs call. > > So you end up with an uresolved reference to main when using > --gc-sections et al? > > -- > Grant Edwards grant.b.edwards Yow! Your CHEEKS sit > like > at twin NECTARINES above > gmail.com a MOUTH that knows no > BOUNDS -- > > > > ------------------------------------------------------------------------------ > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users