[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] libminios/openlibm support ready for testing



On 8 July 2014 10:34, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>> On 6 Jul 2014, at 21:02, Thomas Leonard <talex5@xxxxxxxxx> wrote:
>>> On 6 July 2014 21:28, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote:
>>> Darn, that conflicts with
>>> https://github.com/mirage/mirage-platform/pull/94
>>>
>>> I think that #94 is actually ready to merge (at the same time as
>>> xen-minios) into OPAM.  If I do that tomorrow and release it along
>>> with Mirage 1.2.0, we can play hunt-the-regression in the runup to
>>> the 2.0 release.  Anything outstanding on your plate before I do that?
>>>
>>> Only other thing that would be nice to have is having the checksum
>>> stubs compiled as an external library so that they can be moved to
>>> tcpip where they belong.
>>
>> Moving the checksums code to tcpip is easy enough:
>>
>> https://github.com/talex5/mirage-tcpip/commits/checksum
>>
>> But how do I get the list of C libraries to add to the linker command
>> when building on Xen? Looks like just using -output-obj doesn't do
>> this.
>
> Good question.  `ocamlobjinfo` may help:
>
> $ ocamlobjinfo ~/src/git/avsm/ocaml-nocrypto/_build/src/nocrypto.cma
> File /Users/avsm/src/git/avsm/ocaml-nocrypto/_build/src/nocrypto.cma
> Force custom: no
> Extra C object files: -lnocrypto_stubs
> Extra C options:
> Extra dynamically-loaded libraries: -lnocrypto_stubs
> Unit name: Algo_types
> ...
>
> Could write a custom compiler-libs command to extract just the C object
> files, but a sed extraction of the relevant lines should work for now.

I've added some code to mirage to do it:

  https://github.com/mirage/mirage/pull/265

The compiler-libs thing didn't work out, because it too defines a
module called Config.

With this, it's possible to get the checksum code from the tcpip
module after applying this patch:

  https://github.com/talex5/mirage-tcpip/commits/checksum

That works on x86. On ARM, you also need the latest libminios from
Git, because the current version accidentally zeroes out any ELF
sections it wasn't expecting, such as the .got section you get with
relocatable code (I had fun tracking that one down, as you can
imagine).


-- 
Dr Thomas Leonard        http://0install.net/
GPG: 9242 9807 C985 3C07 44A6  8B9A AE07 8280 59A5 3CC1
GPG: DA98 25AE CAD0 8975 7CDA  BD8E 0713 3F96 CA74 D8BA

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.