> -----Original Message-----
> From: llvm-dev [mailto:
llvm-dev...@lists.llvm.org] On Behalf Of ???
> via llvm-dev
> Sent: Monday, December 28, 2015 10:56 PM
> To: llvm-dev
> Subject: [llvm-dev] where does jump table stores?
>
> I got the following message from one paper called readactor:
> > We found that the LLVM compiler only emits data in the
> > executable .text section of x86 binaries when optimizing a
> > switch-case statement. LLVM emits the basic block address
> > corresponding to each switch-case in a table after the current
> > function. As shown in the left part of Figure 6, the switch
> > statement is then implemented as a load from this table and
> > an indirect branch to the loaded address.
>
> I am curious about why llvm puts this jump table(extrances of cases
> for switch). I did the same test for gcc, I found gcc stores it in
> rodata. I think rodata section is a good place for those structures to
> stay.
> If there is any misunderstanding, please inform me.
> Thanks.