title: When does the compiler generate multiple jump tables for one program?
body: <p>I have an example cpp code :</p>
  <pre><code>int foo_1(void) { return 5; }
  int foo_2(void) { return 6; }
  int main(int arge, char** argv) {
      int (*procs[]) (void) = { foo_1,foo_2 };
      int count = 0;
      for (int i = 0; i &lt; 100; i++) {
          if (argv[1][i] == '0') break;
          if (argv[1][i] == 'Z') count ^= 1;
      }
      return procs[count]();
  }
  </code></pre>
  <p>when I run the command:</p>
  <pre><code>arm-none-eabi-objdump -R -marm example.elf
  </code></pre>
  <p>I get this output here whcih highlights just one jump table:</p>
  <pre><code>C:\Users\abde_hn\Desktop\simple_example\example.elf:     file format elf32-littlearm
  
  DYNAMIC RELOCATION RECORDS
  OFFSET   TYPE              VALUE
  000002c0 R_ARM_RELATIVE    *ABS*
  000002c4 R_ARM_ABS32       _Z5foo_1v
  000002c8 R_ARM_ABS32       _Z5foo_2v
  </code></pre>
  <p>Can the compiler generate multiple jump tables ?. I was wondering what change do I need to make in the cpp code to generate multiple jump tables instead of just one.</p>