binary naming

Christian Helmuth christian.helmuth at ...1...
Wed Nov 1 15:40:27 CET 2017


Hello Johannes,

I don't know exactly the compilation dependencies of your init binary
and how it should be built. But, you may have a look into

  repos/base-linux/src/test/lx_hybrid_ctors/target.mk

which generates a libtestlib.so shared object for testing on
base-linux. The target.mk just adds a special target which the
original TARGET depends on, but it handles the compilation and linking
manually.

Hope this helps
-- 
Christian Helmuth
Genode Labs

https://www.genode-labs.com/ · https://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth


On Wed, Nov 01, 2017 at 02:01:19PM +0100, Johannes Kliemann wrote:
> Hi Norman,
> 
> just a follow up question: instead of putting a prebuilt binary of init
> into the repo I want to build it from source. Yet I haven't found out
> how to tell the build system to build it with completely custom options
> preferably via the target.mk. I tried to set CFLAGS and LDFLAGS there
> but the build system still does it's own linking which makes the binary
> segfaulting if executed on the host.
> Is there a way to do this or do I need to build it externally?
> 
> Regards,
> Johannes
> 
> Am 26.10.2017 um 13:39 schrieb Johannes Kliemann:
> > Hi Norman,
> > 
> > using a separate init to chdir also made the segfault disappear and I
> > can now successfully run the timer test on Linux [1].
> > 
> > Regards,
> > Johannes
> > 
> > [1]:
> > https://github.com/jklmnn/genode/commit/5cee03703b78018ab42398a3245f8bb148ca9281
> > 
> > 
> > On 10/25/17 11:39, Norman Feske wrote:
> >> Hi Johannes,
> >>
> >> for bootstrapping core, I'd create a custom (statically compiled)
> >> program that merely performs a 'chdir /genode' followed by 'execve
> >> '/genode/core'. This keeps core clean of the bootstrapping magic. This
> >> bootstrapping program can be called '/init' whereas everything
> >> Genode-related resides as '/genode/'.
> >>
> >> I have no good idea about the segfault though. It definitely happens in
> >> init, not core because the fault occurs in 'ld.lib.so', which is not
> >> used by core. You may inspect the debug version of the ld.lib.so binary
> >> (using 'objdump -lSd debug/ld-linux.lib.so') at the faulting ip. The
> >> offset from the start of 'ld-linux.lib.so' can be calculated by
> >> subtracting the load address of ld.lib.so (as reported by the kernel)
> >> from the ip of the fault.
> >>
> >> Cheers
> >> Norman
> >>
> > 
> > ------------------------------------------------------------------------------
> > 
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > genode-main mailing list
> > genode-main at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/genode-main
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> genode-main mailing list
> genode-main at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/genode-main




More information about the users mailing list