Problem of ELF section attribute

Hi,

I am having problem of using LLVM on a program which contains
customized code section.
In addition to ".text" section for keeping code, the program has
another code section, called ".init.text".
The functions in this section are defined as
   "int foo (int, int) __attribute__ ((section (".init.text")));"

If I compile the program with gcc, this section(".init.text") will
have attributes of "AX" (means allocate space and
executable). However, if I first compile the program into llvm IR,
then convert IR to native assembly code using
llc, this section will not have "AX" attribute. This causes the native
executable fails when it tries to call a function
in .init.text section. Any suggestion? (btw, my platform is Linux
running on x86 machine.)

Thank you

Haifeng

Please file a bug. We'll move the discussion there.

Thanks,

Evan