The cctools assembler used by powerpc-apple-darwin requires section directives
in the form:

  .section SEGNAME, SECTION_NAME

And, using a section attribute in gcc passes the name along unmodified.  So,
for example:

  void foo (void) __attribute__((section("bar")));
  void foo (void) {}

produces:

  .section bar
  ...

which generates an assembly-time syntax error.  It would be nice if gcc would
infer the segment name from the data type (__TEXT for functions and __DATA for
data), unless a segment name is present (as indicated by a comma in the section
name specification, perhaps?)

There is some discussion of this in the thread starting here:

  http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00226.html


-- 
           Summary: Named section support should infer segment name
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jconner at apple dot com
GCC target triplet: powerpc-apple-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26262

Reply via email to