Hey Martin,
No I did not have the require_libs declared. I will try that.
Thanks, ramya ________________________________________ From: l4-hackers [l4-hackers-bounces@os.inf.tu-dresden.de] on behalf of Martin Küttler [martin.kuettler@gmail.com] Sent: 04 September 2014 09:27 To: l4-hackers@os.inf.tu-dresden.de Subject: Re: Adding a custom library to l4/pkg/bootstrap
On 09/03/2014 09:51 AM, Masti Ramya Jayaram wrote:
Hey Jan,
Sorry for underspecifying it. Here are the details.
I have a library called scc-sec under the l4/pkg directory. It has one file:
a. init.c that contains
void hello(){ printf("hello"); }
I compile this as a library and I can see the scc-sec.so and scc-sec.a in the l4/build/pkg/scc-sec directory
Now in l4/pkg/bootstrap:
a. Control file requires: (added) scc-sec
b. Make.rules: -lscc-sec
Is "-lscc-sec" the literal content of this file? That doesn't do anything.
c. startup.cc
I declare the function as:
extern "C" { void hello(); }
and somewhere in startup() function, I call it
hello();
On trying to compile this, I get (exact error as it is compiled)
in path_to-startup.cc: undefined reference to function "hello()"
I do not think it is the printf because it explicitly gives me an undefined reference to hello :)
To me this looks like you don't actually link to your scc-sec library. Does your Makefile for bootstrap include something like REQUIRES_LIBS = scc_sec ?
Martin
_______________________________________________ l4-hackers mailing list l4-hackers@os.inf.tu-dresden.de http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers