Re: Strange problem with multi-section
On Thu, 21 Aug 2003, Khaki Wizard [EMAIL PROTECTED] wrote: John Marshall wrote: These are messages from build-prc, not m68k-palmos-g++. Congratulations; this diagnostic is not easy to produce. Actually it is the output of obj-res. Ah. Well, that would be the *easy* way to produce this diagnostic. As you have found, there is not enough information available to obj-res for it to correctly process an executable with multiple code sections. That is why the manual tells you to use build-prc directly on the executable, rather than via obj-res, if you are building something with multiple code sections. Could you tell me how to figure out where is something like .data+0x1998. I can't find it in the objdump output. Or I may use some options? You want to look at the symbol table with m68k-palmos-objdump -t. However that listing is not in a particularly legible format, so it is probably easier to look at the link map produced by linking with -Wl,-Map,foo.map or to look at the symbol table with m68k-palmos-nm. m68k-palmos-nm foo | grep ' [dD] ' will show you just the symbols that are defined in the initialised data section. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Strange problem with multi-section
Actually it is the output of obj-res. I only put section attribute at the function prototypes. Could you tell me how to figure out where is something like .data+0x1998. I can't find it in the objdump output. Or I may use some options? Thanks, --- John Marshall [EMAIL PROTECTED] wrote: On Wed, 20 Aug 2003 11:45:44 -0700 (PDT), Khaki Wizard wrote: When I multi-sectioned my C++ program, g++ has some warnings like: g2palm:.data+0x1998: warning: reloc relative to strange section 'SECT2' These are messages from build-prc, not m68k-palmos-g++. Congratulations; this diagnostic is not easy to produce. The most likely way to get it is via putting a section attribute on something that is not code. (Because the name of the technique is multiple *code* sections, it's not easy to imagine why anyone might do that :-).) You probably also have to initialise some other global variable to point to that something. Where do your SECT1 and SECT2 section annotations appear? Only on functions, one hopes (and conceivably on constant data, but here there be dragons). You can track this down even more quickly by using objdump or nm to find out which of your global variables is at .data+0x1998, and looking at its initialiser. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Strange problem with multi-section
Hi, When I multi-sectioned my C++ program, g++ has some warnings like: g2palm:.data+0x1998: warning: reloc relative to strange section 'SECT2' g2palm:.data+0x19d6: warning: reloc relative to strange section 'SECT2' g2palm:.data+0x19fc: warning: reloc relative to strange section 'SECT1' g2palm:.data+0x1a5c: warning: reloc relative to strange section 'SECT1' And when I ran it on Palm simulator, all resources, like forms, menus, labels disappeared, although it seems to be still running (I got trace output). Anybody knows the problem? By the way, can I put virtual functions into different sections? I mean, the virtual functions in the inherited class. Thanks, __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: Strange problem with multi-section
On Wed, 20 Aug 2003 11:45:44 -0700 (PDT), Khaki Wizard wrote: When I multi-sectioned my C++ program, g++ has some warnings like: g2palm:.data+0x1998: warning: reloc relative to strange section 'SECT2' These are messages from build-prc, not m68k-palmos-g++. Congratulations; this diagnostic is not easy to produce. The most likely way to get it is via putting a section attribute on something that is not code. (Because the name of the technique is multiple *code* sections, it's not easy to imagine why anyone might do that :-).) You probably also have to initialise some other global variable to point to that something. Where do your SECT1 and SECT2 section annotations appear? Only on functions, one hopes (and conceivably on constant data, but here there be dragons). You can track this down even more quickly by using objdump or nm to find out which of your global variables is at .data+0x1998, and looking at its initialiser. John -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/