ARM: Cannot export all symbols from a module

I am creating a program in assembler, using several modules. The Assembler manual states that using the EXPORT directive, without any arguments, exports all symbols from the module. When I use this construct, I get flooded with undefined symbol errors. I have to go back and individually export each symbol in order to get a clean assembly and link. Is this an artifact of using an evaluation license, or is something screwy going on. I tried EXPORT * and it really yelled at me. Having to individually export all of the variable names and equates would be a major hurt. Thanks.

Parents
  • I am creating a program in assembler, using several modules.

    Apparently not really. If they really were several modules, as opposed to just a single, monolithic program split into several files, you wouldn't be trying to export everything to everybody.

    Having to individually export all of the variable names and equates would be a major hurt.

    That's one of the most helpful hurts you'll have suffered in a while. Let me explain that by way of an adage that even made it to the Jargon File:

    Patient: Doctor, help me! Every time I do {insert wild gesture here}, it hurts like heck!
    Doctor: Well, so don't do that, then!

    That pain you're facing is, figuratively speaking, your program yelling at you: "Don't do that, then!"

    The way you're planning to do this offers essentially no benefits over just pasting the entire source code back into a single source file. Modules worthy of that name have interface specifications, and they export only that interface, not their entire inner workings. That interface is then published in an include file for other modules to refer to. Things should go into the module's inferface on a strict needs-to-be-there basis, only.

    Right now, your point-of-view seems to be: "Because I don't know what needs to be exported, I'll just export everything." But not knowing is hardly ever a good basis for any decision. The exact opposite approach is what you should do: export nothing to begin with, then add only those things that really need to be. Among other things, this way you'll end up knowing more about your program. You'll not just have figured out what had to be in the interface, but also why.

Reply
  • I am creating a program in assembler, using several modules.

    Apparently not really. If they really were several modules, as opposed to just a single, monolithic program split into several files, you wouldn't be trying to export everything to everybody.

    Having to individually export all of the variable names and equates would be a major hurt.

    That's one of the most helpful hurts you'll have suffered in a while. Let me explain that by way of an adage that even made it to the Jargon File:

    Patient: Doctor, help me! Every time I do {insert wild gesture here}, it hurts like heck!
    Doctor: Well, so don't do that, then!

    That pain you're facing is, figuratively speaking, your program yelling at you: "Don't do that, then!"

    The way you're planning to do this offers essentially no benefits over just pasting the entire source code back into a single source file. Modules worthy of that name have interface specifications, and they export only that interface, not their entire inner workings. That interface is then published in an include file for other modules to refer to. Things should go into the module's inferface on a strict needs-to-be-there basis, only.

    Right now, your point-of-view seems to be: "Because I don't know what needs to be exported, I'll just export everything." But not knowing is hardly ever a good basis for any decision. The exact opposite approach is what you should do: export nothing to begin with, then add only those things that really need to be. Among other things, this way you'll end up knowing more about your program. You'll not just have figured out what had to be in the interface, but also why.

Children
More questions in this forum