public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Current gcc snapshot, -ffunction-sections
@ 2000-01-19 16:43 Chan Shih-Ping Richard
  2000-01-20  4:20 ` [ECOS] " Bart Veer
  0 siblings, 1 reply; 2+ messages in thread
From: Chan Shih-Ping Richard @ 2000-01-19 16:43 UTC (permalink / raw)
  To: ecos-discuss

The current gcc snapshot (20000117) doesn't seem
to add prefixes (.data., .rodata.) to data sections
when compiled with -ffunction-sections -fdata-sections.
(Target is sparclite-elf). 

I think I've isolated the problem to config/elfos.h
/* BTW: sec = 0 means prefix .text.
        sec = 1 means prefix .data.
        sec = 2 means prefix .rodata.
        sec = 3 means no prefix */

                                                                \
      if (TREE_CODE (DECL) == FUNCTION_DECL)                    \
        sec = 0;  /* .text. */                                  \
      else if (DECL_INITIAL (DECL) == 0                         \
               || DECL_INITIAL (DECL) == error_mark_node)       \
        sec = 3;   /* NO PREFIX!! */                            \
      else if (DECL_READONLY_SECTION (DECL, RELOC))             \
        sec = 1;  /* prefix .rodata. but never seem to get here */ \
      else                                                      \
        sec = 2;  /* prefix .data. but never seem to get here */ 

Can anyone explain why the first "else if" captures all
the .data and .rodata sections which result in no
prefix. (Symptom is that the assembler complains about
"symbol already defined".) The ecosSWtools of 3/99 doesn't
have a catch-all clause and prepends .text./.rodata./.data.
as necessary.

Removing the offending clause "seems" to work. The resulting
cross-compiler (gcc-20000117, binutils-20000117, newlib-1.8.2)
is able to build the tutorial and run simple tests.

-- 

Chan Shih-Ping (Richard) <cshihpin@dso.org.sg>
DSO National Laboratories
20 Science Park Drive
Singapore 118230

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ECOS] Re: Current gcc snapshot, -ffunction-sections
  2000-01-19 16:43 [ECOS] Current gcc snapshot, -ffunction-sections Chan Shih-Ping Richard
@ 2000-01-20  4:20 ` Bart Veer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Veer @ 2000-01-20  4:20 UTC (permalink / raw)
  To: cshihpin; +Cc: ecos-discuss

>>>>> "Richard" == Chan Shih-Ping Richard <cshihpin@dso.org.sg> writes:

    Richard> The current gcc snapshot (20000117) doesn't seem
    Richard> to add prefixes (.data., .rodata.) to data sections
    Richard> when compiled with -ffunction-sections -fdata-sections.
    Richard> (Target is sparclite-elf). 

    <snip>

Thanks for this report. I am afraid that ecos-discuss is not really
the right forum for this, although it may help other eCos users who
are trying to use recent gcc snapshots. Few if any of the gcc
developers will monitor this mailing list - they have enough traffic
on their own mailing lists to keep themselves busy - and the eCos
maintainers have no special privileges when it comes to the gcc source
tree. The best mailing list for this issue is probably
gcc@gcc.gnu.org, see http://gcc.gnu.org/ for details.

Bart Veer // eCos net maintainer

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-01-20  4:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-19 16:43 [ECOS] Current gcc snapshot, -ffunction-sections Chan Shih-Ping Richard
2000-01-20  4:20 ` [ECOS] " Bart Veer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).