CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    John E is offline Elite Member Power Poster
    Join Date
    Apr 2001
    Location
    Manchester, England
    Posts
    4,867

    Help with Linux -> Windows port ?

    I'm porting a program from Linux to Windows (well technically, to Cygwin). It contains one small assembly module. Fortunately there don't seem to be any system calls (i.e. int calls). It's mostly just mov / push / pop / jne / jz and similar instructions. However each function seems to be identified something like this:-

    Code:
    .globl the_function_name
          .type the_function_name,@function
    This compiles fine under Linux/as or Linux/gcc but it seems to be upsetting Cygwin/gcc. I did a bit of googling and discovered that for the .type directive, the above syntax is only valid for ELF (Linux format) targets. For COFF format targets (Unix / Windows) .type seems to do something completely different and has a different syntax.

    I'm a complete duffer when it comes to assembly language - so how would I need to change that second line to make it work with my Cygwin compiler?
    Last edited by John E; September 18th, 2009 at 01:30 PM.
    "A problem well stated is a problem half solved.” - Charles F. Kettering

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured