alloca() link issue (RCVT BREW v1.2 compiler) | developer.brewmp.com alloca() link issue (RCVT BREW v1.2 compiler) | developer.brewmp.com

Developer

alloca() link issue (RCVT BREW v1.2 compiler)

Forums:

Hi,

I find that when the program uses alloca(), the linker generates the error:
Error: L6265E: Non-RWPI Section libspace.o(.bss) cannot be assigned to PI Exec region ER_ZI.
Error: L6248E: libspace.o(.text) in PI region 'ER_RO' cannot have address type relocation to __libspace_start in PI region 'ER_ZI'.

But I don't find any support for this function in BREW SDK. Is there other way to fix this bug?

Do I have to implement my own alloca? :confused:

MALLOC and REALLOC are wrapper functions to malloc and realloc in C.
There is no alloca in BREW.

MALLOC and REALLOC are wrapper functions to malloc and realloc in C.
There is no alloca in BREW.

I implmeneted my own alloca for BREW.
Thanks. ;)

I implmeneted my own alloca for BREW.
Thanks. ;)

aliothliu wrote:I implmeneted my own alloca for BREW.
Thanks. ;)
Would you share it? Because I just came across the same issue, and a working ALLOCA would be quite useful to have.

aliothliu wrote:I implmeneted my own alloca for BREW.
Thanks. ;)
Would you share it? Because I just came across the same issue, and a working ALLOCA would be quite useful to have.