CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2010
    Posts
    907

    Assembly code with tons of segments

    My program does compile but does not link. ~100 segments
    Do I separate each segment into modules?
    Or the linker virtually doesn't allow that many?

    Question 2:
    if this program is a driver, And I downloaded winasm515 as a debugger IDE, I wonder if my app calls this driver, would the debugger automatically switch to the driver when necessary? I still don't have the program linked, so I am not sure.
    Thanks
    Jack
    Last edited by lucky6969b; August 25th, 2011 at 07:36 PM.

  2. #2
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Assembly code with tons of segments

    Quote Originally Posted by lucky6969b View Post
    My program does compile but does not link. ~100 segments
    Do I separate each segment into modules?
    Or the linker virtually doesn't allow that many?
    I would only expect such an excessive segment count if the program already is made up out of a vast lot of modules (i.e. compilation units). But in a scenario lke that, all those segments would most likely be part of a few groups that then would be contracted to an equal number of actual segments in the link stage.

    However, if you really have around 100 entirely distinct and ungrouped segments I wouldn't be surprised at all when your linker throws up...

    Question 2:
    if this program is a driver, [...]
    Why "if"? Didn't you say it's your program? In this case I would suppose you to know. I don't know the package you're using but the debugger actually may not allow you to step into code below ring 3 which actually could be a problem in case you want to debug a device driver. At any rate, I think you'll never know until you either try or thoroughly read the documentation of your assembler/IDE/debugger package.
    Last edited by Eri523; August 25th, 2011 at 08:47 PM.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

  3. #3
    Join Date
    Dec 2010
    Posts
    907

    Re: Assembly code with tons of segment

    he he why i said "if" was because it was a disassembly of "something" Blush!
    Thanks
    Jack

  4. #4
    Join Date
    Jun 2010
    Location
    Germany
    Posts
    2,675

    Re: Assembly code with tons of segment

    Ah, I see. You must know that, although perhaps syntactically suitable for that, the output of a disassembler may not always be simply recompiled. Your "something" seems to be a bit unusual and/or complex to have the disassembler generate such a crude output.
    I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.

    This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.

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