I found two such declarations usable, but there may be more I don't know of:
unsigned char _sdcc_external_startup(void);
extern __idata TByte _start__stack;
First only as a sanity check for definition (during compilation of a library or an user module). Second allows it's use in C (to fill stack with some value or for runtime sanity check).
BTW: is there a way to access some assembler/linker symbols in C other than inline assembler? For example s_SSEG (__start__stack equivalent?), l_SSEG, s_CSEG, l_CSEG etc. There are many uses for them.
About using that symbols in inline assembler:
MOV (s_SSEG+0x38), #0xA5 ; works
MOV (s_SSEG+l_SSEG), #0xA5 ; but this not (causes ?ASxxxx-Error-<r> relocation error)
(I'm aware that I should use indirect addressing here, but this way example is simple)
Is below the only way to do this:
MOV A, #s_SSEG
ADD A, #l_SSEG
MOV R0, A
MOV @R0, #0xA5