[LLVMdev] Adding support to LLVM for data & code layout (needed by GHC)

Anton Korobeynikov anton at korobeynikov.info
Wed Jun 16 05:45:48 PDT 2010


> There is one complication though. LLVM (and GCC as well) don't support
> subsections. While you can define what section globals and functions
> are in, this doesn't support defining the subsection. If you say to
> LLVM, put function f in section "text 12", it produces assembly like:
>
> .section text 12,"rw" @progbits
This seems easy to fix during the asmprinting. E.g. if section name is
an integer from 0 till 8192 => emit as an subsection. Side q: what
will you do when you run out of subsections?

-- 
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list