Merge pull request #1868 from jg1uaa/master
change hello.mo building process, compile and link separately
This commit is contained in:
commit
c7d9daefaa
|
@ -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
|
||||
|
|
|
@ -48,7 +48,7 @@ void components_init(void)
|
|||
#endif
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
rt_system_module_init();
|
||||
rt_system_dlmodule_init();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -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
|
||||
/*@}*/
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue