Trying to assign a function to a user-named section fails on darwin in the 4.0, 4.1, and mainline. For example, compiling this code:
void specialfn (void) __attribute__((section ("__TEXT,__init"))); void specialfn (void) {} Places the function 'specialfn' into the default .text section instead of the user-specified __init section. From the assembly code: .text .align 2 .globl _specialfn _specialfn: Should be: .section __TEXT,__init .align 2 .globl _specialfn _specialfn: -- Summary: section attribute doesn't work on darwin Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jconner at apple dot com GCC target triplet: powerpc-apple-darwin8.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25376