Does studio 12 support the section __attribute__?  It seems to accept it 
without warning, but I don't actually see my section being created:

#include <sys/types.h>

typedef struct {
        uint32_t        traceid;
        const char *    function;
} tracevar_t;

#define TRACEVAR_ID     (uint32_t)0x1234567

main()
{
        { static tracevar_t xxx __attribute__((section(".pds_tracevar"))) = { 
TRACEVAR_ID, __func__ }; }
}

psg-solaris-01$ cc -o foo foo.c
"foo.c", line 11: warning: old-style declaration or incorrect type for: main

psg-solaris-01$ readelf -S foo | grep pds
psg-solaris-01$



      
_______________________________________________
tools-compilers mailing list
[email protected]

Reply via email to