diff options
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index bf8f34ab9e..69a2a79ba8 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -427,7 +427,6 @@ struct plugin_api { | |||
427 | 427 | ||
428 | }; | 428 | }; |
429 | 429 | ||
430 | #ifndef SIMULATOR | ||
431 | /* plugin header */ | 430 | /* plugin header */ |
432 | struct plugin_header { | 431 | struct plugin_header { |
433 | unsigned long magic; | 432 | unsigned long magic; |
@@ -438,6 +437,7 @@ struct plugin_header { | |||
438 | enum plugin_status(*entry_point)(struct plugin_api*, void*); | 437 | enum plugin_status(*entry_point)(struct plugin_api*, void*); |
439 | }; | 438 | }; |
440 | #ifdef PLUGIN | 439 | #ifdef PLUGIN |
440 | #ifndef SIMULATOR | ||
441 | extern unsigned char plugin_start_addr[]; | 441 | extern unsigned char plugin_start_addr[]; |
442 | extern unsigned char plugin_end_addr[]; | 442 | extern unsigned char plugin_end_addr[]; |
443 | #define PLUGIN_HEADER \ | 443 | #define PLUGIN_HEADER \ |
@@ -445,9 +445,12 @@ extern unsigned char plugin_end_addr[]; | |||
445 | __attribute__ ((section (".header")))= { \ | 445 | __attribute__ ((section (".header")))= { \ |
446 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ | 446 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ |
447 | plugin_start_addr, plugin_end_addr, plugin_start }; | 447 | plugin_start_addr, plugin_end_addr, plugin_start }; |
448 | #endif | ||
449 | #else /* SIMULATOR */ | 448 | #else /* SIMULATOR */ |
450 | #define PLUGIN_HEADER | 449 | #define PLUGIN_HEADER \ |
450 | const struct plugin_header __header = { \ | ||
451 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ | ||
452 | NULL, NULL, plugin_start }; | ||
453 | #endif | ||
451 | #endif | 454 | #endif |
452 | 455 | ||
453 | int plugin_load(const char* plugin, void* parameter); | 456 | int plugin_load(const char* plugin, void* parameter); |
@@ -456,7 +459,6 @@ void* plugin_get_audio_buffer(int *buffer_size); | |||
456 | void plugin_tsr(void (*exit_callback)(void)); | 459 | void plugin_tsr(void (*exit_callback)(void)); |
457 | 460 | ||
458 | /* defined by the plugin */ | 461 | /* defined by the plugin */ |
459 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter) | 462 | enum plugin_status plugin_start(struct plugin_api* rockbox, void* parameter); |
460 | __attribute__ ((section (".entry"))); | ||
461 | 463 | ||
462 | #endif | 464 | #endif |