#203 open
Peter Johnson

missing GAS commands/unable to build GCC-generated ASM files

Reported by Peter Johnson | June 25th, 2011 @ 07:52 PM

Originally posted on Trac by Alexx999
Original Trac Ticket

  Description

our project (mpc-hc) needs to make GCC generated code compatible with MSVC /SAFESEH linker option (everything must be in one binary file - that's concept), so we tried to compile in 2 steps - to ASM by GCC and to objects by YASM
enlisting problems in order from more important to less important:
1) missing .secrel32 command results in broken object
2) missing .set command (this one should be easy to fix) - brocken objects
3) missing .loc command - probably brocken objects too
4) missing .def command - affects only debug info according to docs
5) missing movzd command - can be fixed (presumably) by replacing to movzx
6) missing /nop (with operand) , /APP and /NO_APP - but they seem to have no impact when stripped from files

h3. Trac Attachments
http://www.tortall.net:80//projects/yasm/attachment/ticket/221/sour...
http://www.tortall.net:80//projects/yasm/raw-attachment/ticket/221/...
http://www.tortall.net:80//projects/yasm/timeline?from=2010-08-08T1...
h3. Trac Comments
Changed 11 months ago by Alexx999



ASM sources, compiled by GCC 4.6.0

                  Changed 11 months ago by Alexx999

      attachment
        sources.zip​
          added

ASM sources, compiled by GCC 4.6.0

      attachment
        sources.zip​
          added

comment:1

              Changed 11 months ago by Alexx999


UPD: I've found out that secrel is about debugging, but objects generated by yasm is still broken (program has lots of bugs and crashes when using this objects), while compiled by as works ok

comment:2

              Changed 11 months ago by peter@tortall.net


These look fairly straightforward to fix.  I'll try to get these implemented within the next couple of weeks.

      comment:2

                  Changed 11 months ago by peter@tortall.net

      Owner
        set to peter@tortall.net
    
      Status
        changed from new to assigned

These look fairly straightforward to fix.  I'll try to get these implemented within the next couple of weeks.

      Owner
        set to peter@tortall.net
    
      Status
        changed from new to assigned

comment:3

              Changed 11 months ago by peter@tortall.net


Forgot to mention: .loc is already implemented; you just need to add "-g dwarf2" to the yasm command line.

comment:4

              Changed 10 months ago by peter@tortall.net


1) is fixed in [2365]
2) being worked on
3) is fixed by using -g dwarf2
4) is fixed in [2360]
5) I don't see "movzd" in the test cases, and gas doesn't seem to have it?  Can you clarify this one?
6) /nop isn't in the test cases?  /APP and /NO_APP are strange; my gas seems to only handle #APP and #NO_APP.  I can add handling for the "/" versions, but is there something special about your gas or gcc?

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Yasm Modular Assembler Project

Shared Ticket Bins

People watching this ticket

Pages