From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 From: Jens Staal Date: Sat, 28 Jul 2012 20:12:51 +0200 Message-ID: To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Subject: [9fans] asm question Topicbox-Message-UUID: a65e0c3c-ead7-11e9-9d60-3106f5b1d025 Hi I am currently attempting to build up-to-date APE libs for gnu/gcc (the port found in /n/sources/extra/gcc). The APE libs there are from 2002 and there are some significant additions after that that I would like to exploit. The .c parts of the library builds nicely and I have a near-complete port. The only issues I have is that .s files seem to be assembler-specific. crt0.s can only be processed by gnu/as and the .s files in ap/386/ and 9/386/ can only be processed by 8a. I actually naively tried making APE libraries with the .s files processed by 8a and renamed them from .8 to .o and built the libraries. That failed during linking of a test-compile (with clear error messages pointing to those .s-derived object files) so apparently asm is compiler-specific (which sort of demonstrates how little I know on this level...). The only solution I can see is to try to manually "translate" those .s files from "Plan9 assembly" to "GNU assembly". The best reference comparison I have found is "libc/386/setlongjmp.s" from the old port in /n/sources/extra/gcc and the current APE libs ap/386/setlongjmp.s. The two files look quite similar, appart from that the first is "GNU" style and the other "Plan9" style. It is however still pretty unclear to me what the different things actually say and especially carry over that info to translate the rest of the .s files. What I wonder is whether there is any good documentation/info somewhere that could help me translate the rest of the .s files?