#2235 Relocation Error

closed-fixed
None
MCS51
5
2013-12-16
2013-12-13
FrankCor
No

The following C code (see Main.c):

include <8051.h>

include <stdio.h>

void main(void){
unsigned long UL1, UL2, UL3;
sfr32 at (0xFCFBFAF9) SFR32;

UL1 = 0xABCDEF01 + SFR32;
UL2 = UL1 + SFR32;
UL3 = UL2 + SFR32;
printf("0x%X 0x%X 0x%X\n", UL1, UL2, UL3);

}
produces the following error messages from the assembler (see Main.asm):
Main.asm:348: Error: <r> relocation error
Main.asm:351: Error: <r> relocation error
Main.asm:354: Error: <r> relocation error
Main.asm:357: Error: <r> relocation error
Main.asm:360: Error: <r> relocation error
Main.asm:363: Error: <r> relocation error
Main.asm:366: Error: <r> relocation error
Main.asm:369: Error: <r> relocation error
Main.asm:376: Error: <r> relocation error
Main.asm:377: Error: <r> relocation error
Main.asm:378: Error: <r> relocation error
Main.asm:379: Error: <r> relocation error
due to the shifting of addresses.
Compile command: sdcc --model-large -c Main.c
SDCC version: SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.3.0 #8604 (May 11 2013) (Linux)

1 Attachments

Related

Bugs: #2235

Discussion

  • Maarten Brock

    Maarten Brock - 2013-12-15
    • status: open --> closed-fixed
    • assigned_to: Maarten Brock
     
  • Maarten Brock

    Maarten Brock - 2013-12-15

    Fixed in SDCC 3.3.2 #8902.

     
    • FrankCor

      FrankCor - 2013-12-16

      Maarten,
      Thanks for the quick response. But how do I access 3.3.2?

      Frank

      From: Maarten Brock [mailto:maartenbrock@users.sf.net]
      Sent: Sunday, December 15, 2013 5:40 AM
      To: [sdcc:bugs]
      Subject: [sdcc:bugs] #2235 Relocation Error

      Fixed in SDCC 3.3.2 #8902.


      [bugs:#2235]http://sourceforge.net/p/sdcc/bugs/2235/ Relocation Error

      Status: closed-fixed
      Created: Fri Dec 13, 2013 08:53 PM UTC by FrankCor
      Last Updated: Fri Dec 13, 2013 08:54 PM UTC
      Owner: Maarten Brock

      The following C code (see Main.c):

      include <8051.h>
      include

      void main(void){
      unsigned long UL1, UL2, UL3;
      sfr32 at (0xFCFBFAF9) SFR32;

      UL1 = 0xABCDEF01 + SFR32;

      UL2 = UL1 + SFR32;

      UL3 = UL2 + SFR32;

      printf("0x%X 0x%X 0x%X\n", UL1, UL2, UL3);

      }
      produces the following error messages from the assembler (see Main.asm):
      Main.asm:348: Error: relocation error
      Main.asm:351: Error: relocation error
      Main.asm:354: Error: relocation error
      Main.asm:357: Error: relocation error
      Main.asm:360: Error: relocation error
      Main.asm:363: Error: relocation error
      Main.asm:366: Error: relocation error
      Main.asm:369: Error: relocation error
      Main.asm:376: Error: relocation error
      Main.asm:377: Error: relocation error
      Main.asm:378: Error: relocation error
      Main.asm:379: Error: relocation error
      due to the shifting of addresses.
      Compile command: sdcc --model-large -c Main.c
      SDCC version: SDCC : mcs51/gbz80/z80/z180/r2k/r3ka/ds390/pic16/pic14/TININative/ds400/hc08/s08 3.3.0 #8604 (May 11 2013) (Linux)


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/sdcc/bugs/2235/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #2235


Log in to post a comment.