summaryrefslogtreecommitdiff
path: root/payloads/libpayload/i386/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'payloads/libpayload/i386/main.c')
-rw-r--r--payloads/libpayload/i386/main.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/payloads/libpayload/i386/main.c b/payloads/libpayload/i386/main.c
index 066e2a275e..a167218ffc 100644
--- a/payloads/libpayload/i386/main.c
+++ b/payloads/libpayload/i386/main.c
@@ -36,17 +36,12 @@
* stack we store the original stack pointer from the calling application.
*/
-static void start_main(void);
extern void _leave(void);
static struct {
- uint32_t eip[2];
- uint32_t raddr[2];
uint32_t esp;
-} initial_stack __attribute__ ((section(".istack"))) = {
- { (uint32_t) start_main, 0 },
- { (uint32_t) _leave, 0 },
- (uint32_t) & initial_stack,
+} initial_stack __attribute__ ((section(".istack"))) = {
+ (uint32_t) &initial_stack,
};
void *_istack = &initial_stack;
@@ -55,7 +50,7 @@ void *_istack = &initial_stack;
* This is our C entry function - set up the system
* and jump into the payload entry point.
*/
-static void start_main(void)
+void start_main(void)
{
extern int main(void);
@@ -70,9 +65,10 @@ static void start_main(void)
* user gets control goes here.
*/
- /* Go to the entry point. */
-
- /* In the future we may care about the return value. */
+ /*
+ * Go to the entry point.
+ * In the future we may care about the return value.
+ */
(void) main();
/*