hello
there is problem with static local variables initialization: Error: <r> relocation error</r>
example:
int test() {
static int a = 1;
return 0;
}
void test2() {
test();
}
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ez80_z80/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 3.9.1 #11242 (MINGW64)
published under GNU General Public License (GPL)
br
Zahari
Wiki: SDCC 4.3.0 Release
Wiki: SDCC 4.4.0 Release
Wiki: SDCC 4.5.0 Release
Wiki: SDCC 4.6.0 Release
Wiki: SDCC-STD-UX
I can't reproduce this issue on my Debian GNU/Linux testing system using SDCC 3.9.1 #11249.
Could you post the .asm file (if possible compiling with --no-peep and --fverbose-asm).
Philipp
sdcc: Calling assembler...
sdcc: sdasstm8.exe -plosgffwy ""./build\main".asm"
./build\main.asm:638: Error: <r> relocation error
make: *** [makefile:49: compile] Error 1
The terminal process terminated with exit code: 2</r>
sorry but i cant find SDCC 3.9.1 #11249 in nightly build. I use latest version from 29.05.2019
http://sourceforge.net/projects/sdcc/files/snapshot_builds/x86_64-w64-mingw32/sdcc-snapshot-x86_64-w64-mingw32-20190529-11242.zip/download
reported as:
$ /opt/sdcc/bin/sdcc -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ez80_z80/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 3.9.1 #11242 (MINGW64)
published under GNU General Public License (GPL)
br
Harry
The .asm file looks as if you are compiling with --debug --out-fmt-elf. Maybe this be a duplicate of Bug [#2741].
Related
Bugs: #2741
Last edit: Maarten Brock 2019-11-02
yes if i remove --debug option error goes away.
br
Harry