summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bsp/x86/Makefile5
-rw-r--r--bsp/x86/applications/application.c2
-rw-r--r--bsp/x86/drivers/board.c8
-rw-r--r--components/libc/libdl/arch/x86.c2
4 files changed, 5 insertions, 12 deletions
diff --git a/bsp/x86/Makefile b/bsp/x86/Makefile
index cdb4f4ca8c..eb4654193b 100644
--- a/bsp/x86/Makefile
+++ b/bsp/x86/Makefile
@@ -7,7 +7,7 @@ all: rtthread rtsym exe dll floppy.img
@sudo mount -t vfat floppy.img tmp -o loop
@sudo cp -fv rtthread.elf tmp/boot/oskernel
@sudo rm tmp/bin/* -fr
- @sudo cp out/* tmp/bin/ -fv
+ @sudo cp out/*.mo tmp/bin/ -fv
@sudo umount tmp
rtthread:
@@ -23,7 +23,8 @@ out:
mkdir -p out
dll: obj out
- $(CC) -shared -s -fPIC -e main -Isrc src/hello.c -o out/hello.mo
+ $(CC) -c -fPIC -Isrc src/hello.c -o out/hello.o
+ $(CC) -s -Wl,-shared,-melf_i386,--entry=main -o out/hello.mo out/hello.o
disasm: obj out
$(CC) -shared -S -fPIC -Isrc src/hello.c -o obj/hello.s
diff --git a/bsp/x86/applications/application.c b/bsp/x86/applications/application.c
index 2eb4e9b8ba..8928e6357e 100644
--- a/bsp/x86/applications/application.c
+++ b/bsp/x86/applications/application.c
@@ -48,7 +48,7 @@ void components_init(void)
#endif
#ifdef RT_USING_MODULE
- rt_system_module_init();
+ rt_system_dlmodule_init();
#endif
#endif
}
diff --git a/bsp/x86/drivers/board.c b/bsp/x86/drivers/board.c
index 4d91604ab3..211ae1832a 100644
--- a/bsp/x86/drivers/board.c
+++ b/bsp/x86/drivers/board.c
@@ -71,12 +71,4 @@ void reboot(void)
}
FINSH_FUNCTION_EXPORT(reboot, reboot PC)
#endif
-#ifdef RT_USING_DFS
-#include <time.h>
-time_t time(time_t* tm)
-{
- (void)tm;
- return 0;
-}
-#endif
/*@}*/
diff --git a/components/libc/libdl/arch/x86.c b/components/libc/libdl/arch/x86.c
index 4f70b1d22e..16f2322fb4 100644
--- a/components/libc/libdl/arch/x86.c
+++ b/components/libc/libdl/arch/x86.c
@@ -11,7 +11,7 @@
#include "../dlmodule.h"
#include "../dlelf.h"
-#ifdef __x86__
+#ifdef __i386__
#define R_X86_64_GLOB_DAT 6 /* Create GOT entry */
#define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */