x86: remove hacks to include functions

None of this is currently necessary, the spurious interrupt
stubs and exception entry code is included in the binary just
fine. To make matters worse, some data referenced lives in the
.intList section which is completely stripped out of the binary.

If in the future we find certain essential functions are being
garbage collected when they should not be, the proper way to
mitigate this is with KEEP() directives in the linker script.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2017-05-12 13:01:25 -07:00 committed by Anas Nashif
commit 3d3d6a85df
2 changed files with 0 additions and 34 deletions

View file

@ -25,17 +25,6 @@
extern void _SpuriousIntHandler(void *);
extern void _SpuriousIntNoErrCodeHandler(void *);
/*
* These 'dummy' variables are used in kernel_arch_init() to force the
* inclusion of the spurious interrupt handlers. They *must* be declared in a
* module other than the one they are used in to get around garbage collection
* issues and warnings issued some compilers that they aren't used. Therefore
* care must be taken if they are to be moved. See kernel_structs.h for more
* information.
*/
void *_dummy_spurious_interrupt;
void *_dummy_exception_vector_stub;
/*
* Place the addresses of the spurious interrupt handlers into the intList
* section. The genIdt tool can then populate any unused vectors with

View file

@ -32,33 +32,10 @@ extern "C" {
*/
static inline void kernel_arch_init(void)
{
extern void *__isr___SpuriousIntHandler;
extern void *_dummy_spurious_interrupt;
extern void *_dummy_exception_vector_stub;
extern char _interrupt_stack[CONFIG_ISR_STACK_SIZE];
extern void _exception_enter(void);
_kernel.nested = 0;
_kernel.irq_stack = _interrupt_stack + CONFIG_ISR_STACK_SIZE;
/*
* Forces the inclusion of the spurious interrupt handlers. If a
* reference isn't made then intconnect.o is never pulled in by the
* linker.
*/
_dummy_spurious_interrupt = &__isr___SpuriousIntHandler;
/*
* Forces the inclusion of the exception vector stub code. If a
* reference isn't made then excstubs.o is never pulled in by the
* linker.
*/
_dummy_exception_vector_stub = &_exception_enter;
}
/**