title: override a weak function A with a function B
body: <p>For an embedded device, I have file containing an array with function pointers storing interrupt handlers, define like that (I can't modify it):</p>
  
  <pre><code>typedef void (*const ISRFunction)(void);
  
  __attribute__((weak)) void ISR0(void){ for(;;); }
  __attribute__((weak)) void ISR1(void){ for(;;); }
  ...
  __attribute__((weak)) void ISR78(void){ for(;;); }
  ...
  
  ISRFunction __vector_table[0x79] = 
  {
      (ISRFunction)&amp;ISR0,
      (ISRFunction)&amp;ISR1,
      ...
      (ISRFunction)&amp;ISR78,
      ...
  }
  </code></pre>
  
  <p>I have a second file which defines some functions, which I can't modify. This file is like:</p>
  
  <pre><code>void blinkLed(void)
  { ... }
  </code></pre>
  
  <p>Finally, I have a main source file, with <code>main</code> function and configuration of device. On interrupt 78, I would like to blink led. So I write a strong function <code>ISR78</code> like that:</p>
  
  <pre><code>void ISR78(void)
  {
      blinkLed();
  }
  </code></pre>
  
  <p>I wondered if there was a solution to override weak function <code>ISR78</code> directly by <code>blinkLed</code>, <em>ie</em> storing address of <code>blinkLed</code> inside <code>__vector_table</code> without modifying it or rename function?</p>
  
  <hr>
  
  <p>EDIT:</p>
  
  <p>I actually use GNU gcc 4.9.3 and associated linker (GNU ld 2.24.0). I can modify <code>main.c</code> and Makefile associated to project.</p>