New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
z88dk: compiles defining org -1 for bss section not generating a separate bss bin for unknown reason #270
Comments
Paulo is there any chance you could have a look at this sooner rather than later? I hadn't realized that this is a critical bug for all rom compiles - nothing will work that is destined for rom. http://www.smspower.org/forums/16691-AnotherZ88DKSDCCDifference#98643 The issue has cropped up before see #65. |
Done. Thanks for reporting. |
Thanks Paulo, the example given now works but the problem still exists in compiles for a reason I haven't been able to determine yet. aaa.c
After the compile a separate bss binary is not generated. The memory map used is this one, excerpt here:
From the map file generated by the compile:
|
I found and fixed another problem for the given C code. Please let me know of any further problems. |
This should be fixed now. Please let me know.
On a related but different topic: how do I get the zsdcpp binary?
I downloaded the nightly build and copied the executables, but we should be able to build from source.
Thanks,
Paulo
From: aralbrec
Sent: 2 de julho de 2017 07:38
To: z88dk/z88dk
Cc: pauloscustodio; State change
Subject: Re: [z88dk/z88dk] z80asm: compiles defining org -1 for bss sectionnot generating a separate bss bin for unknown reason (#270)
Thanks Paulo, the example given now works but the problem still exists in compiles for a reason I haven't been able to determine yet.
aaa.c
// zcc +z80 -v -clib=sdcc_iy aaa.c -o aaa -m
// DATA
unsigned char data[] = "Hello";
// BSS
unsigned buffer[100];
// CODE
int main(void)
{
return 1;
}
After the compile a separate bss binary is not generated.
The memory map used is this one, excerpt here:
SECTION BSS
IF __crt_org_bss
org __crt_org_bss
ELSE
IF __crt_model
org -1
ENDIF
ENDIF
section bss_align_256
section bss_align_128
...
From the map file generated by the compile:
TAR__clib_malloc_heap_size = $FFFFFFFF ; L z80_crt
TAR__crt_interrupt_mode = $FFFFFFFF ; L z80_crt
TAR__crt_org_bss = $FFFFFFFF ; L z80_crt
__clib_malloc_heap_size = $FFFFFFFF ; L z80_crt
__crt_interrupt_mode = $FFFFFFFF ; L z80_crt
__crt_org_bss = $FFFFFFFF ; L z80_crt
DEF__crt_enable_trap = $0000 ; L z80_crt
IOCTL_RESET = $0000 ; G z80_crt
...
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Thanks Paulo. Everything looks good. |
Test code:
zzz.asm
yyy.asm
First a compile that goes straight to binary:
z80asm -b -o=zzz zzz.asm yyy.asm
Everything is good, three files are generated: zzz_CODE.bin, zzz_DATA.bin, zzz_BSS.bin
Next try doing the same but build object files first:
Only two files are generated: zzz_CODE.bin and zzz_DATA.bin. The BSS section has been appended to DATA as if the "org -1" was ignored.
If you put everything into one file and go through object file, again the correct result.
The text was updated successfully, but these errors were encountered: