Closed githubaf closed 2 years ago
Btw: Did you remove SAS/C from your Compiler Explorer page?
switch to C - SAS/C does not support C++
Btw: Did you remove SAS/C from your Compiler Explorer page?
switch to C - SAS/C does not support C++
Ah, I see.
there's an underscore missing: .datachip
should be .data_chip
The old documentation http://cahirwpz.users.sourceforge.net/gcc-amigaos/chip.html#chip says
Note: For compatibility with other AmigaOS ‘C’ compilers, a preprocessor symbol ‘__chip’ is available, which expands to __attribute__((chip)) (see Keyword macros).
All the ‘chip’ attribute does is specifying that data should go to a section called ‘.datachip’. Therefore, the standard ‘GCC’ feature __attribute__((section(".datachip"))) can be used instead.
There is no underscore?
then it's a binutil issue
#NO_APP
.globl _ChipArray
.section .datachip
_ChipArray:
and
hunkdump test
reading test
hunk 000003f3, HUNK_HEADER, 0
4 sections, 0 - 3
sizes: 10252, 408, 140, 24(c)
...
note the (c)
which indicates the chip attribute
Yes, that issue is fixed. __chip works now. Thank you!
It seems that the __chip keyword has no effect and is silently ignored.
compile with
m68k-amigaos-gcc chip_fast.c -Wall --pedantic -noixemul -O2 -o chip_fast
When compiled with SAS/C it works correctly.
Btw: Did you remove SAS/C from your Compiler Explorer page?