[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [Unikraft] Undefined reference error when adding code in stdlib.c
Hi Ajay, > -----Original Message----- > From: Minios-devel <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of > Ajay Garg > Sent: 2018年5月16日 12:20 > To: minios-devel@xxxxxxxxxxxxxxxxxxxx > Subject: [Minios-devel] [Unikraft] Undefined reference error when adding code > in stdlib.c > > Hi All. > > I added the following code in unikraft/lib/nolibc/stdlib.c > > ##################################################### > #include <uk/plat/time.h> > #include <sys/time.h> > > > #define ONE_BILLION 1000000000 > void clock_gettime(struct timespec *t) > { > long nanoseconds = ukplat_monotonic_clock(); > > t->tv_sec = nanoseconds / ONE_BILLION; > t->tv_nsec = nanoseconds % ONE_BILLION; > } > ##################################################### > > > > Now, after I do make, I get the following error : > > ##################################################### > /home/ajay/unikraft/apps/helloworld/build/libnolibc.o: In function > `clock_gettime': > (.text+0x16cd): undefined reference to `ukplat_monotonic_clock' > /home/ajay/unikraft/unikraft/plat/linuxu/Linker.uk:9: recipe for > target '/home/ajay/unikraft/apps/helloworld/build/helloworld_linuxu-x86_64' > failed > make[2]: *** [/home/ajay/unikraft/apps/helloworld/build/helloworld_linuxu- > x86_64] > Error 1 > ##################################################### > > > > Seems that nolibc does not reference platform-specific code. > If so, what is the correct procedure to add this function, which can > be called generically, but uses a platform-specific API to get the > final result? > > "ukplat_monotonic_clock" belongs to Unikraft core library. You can find it in Costin's patch: "[Minios-devel] [UNIKRAFT PATCH 3/3] plat/kvm: Add KVM (x86_64) timer support" https://lists.xenproject.org/archives/html/minios-devel/2018-04/msg00076.html > Thanks and Regards, > Ajay > > _______________________________________________ > Minios-devel mailing list > Minios-devel@xxxxxxxxxxxxxxxxxxxx > https://lists.xenproject.org/mailman/listinfo/minios-devel IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |