This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

data group use with no reason ?

I add and call 2 assembler routines defined in C as
void rtn (void)
to a C program

After being surprised I rewrite the assembler routines as
rtn: ret
I get the following linker error:

*** ERROR 107: ADDRESS SPACE OVERFLOW
SPACE: DATA
SEGMENT: _DATA_GROUP_
LENGTH: 002AH

I know what the message means and can possibly salvage some data space elsewhere
BUT: what are those data segment bytes and is there any way to get rid of this (non)use of valuable space ?

Erik Malund

Parents
  • 1) What happens when you replace the assembly with this C code? (I.E. try to remove the assembler from this problem.)

    void rtn1 (void) {};
    void rtn2 (void) {};
    

    2) I am just checking. Do you do realize the Keil compiler is not "Stack based"? So things like parameters, local variables, and compiler temporaries are preallocated in valuable Data segments. Only the return addresses are placed on the stack.

    3) Can you post an example that creates an extraneous Data segment. (Otherwise we are just shooting in the dark.)

Reply
  • 1) What happens when you replace the assembly with this C code? (I.E. try to remove the assembler from this problem.)

    void rtn1 (void) {};
    void rtn2 (void) {};
    

    2) I am just checking. Do you do realize the Keil compiler is not "Stack based"? So things like parameters, local variables, and compiler temporaries are preallocated in valuable Data segments. Only the return addresses are placed on the stack.

    3) Can you post an example that creates an extraneous Data segment. (Otherwise we are just shooting in the dark.)

Children
No data