Linker error, undefined reference to `_sbrk'

‘Invoking: ARM Windows GCC C Linker (Sourcery Lite Bare)’
arm-none-eabi-gcc -T"D:\M66_OpenCPU_GS3_SDK_V2.3_Eclipse\M66_OpenCPU_GS3_SDK_V2.3_Eclipse\libs\gcc\linkscript.ld" -L"D:\M66_OpenCPU_GS3_SDK_V2.3_Eclipse\M66_OpenCPU_GS3_SDK_V2.3_Eclipse\libs\gcc" -L"C:\Program Files (x86)\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_EABI\arm-none-eabi\lib\thumb" -L"C:\Program Files (x86)\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_EABI\lib\gcc\arm-none-eabi\4.7.2\thumb" -Wl,-Map,“APPGS3MDM32A01.map” -Rbuild -march=armv5te -mthumb-interwork -mfloat-abi=soft -g3 -o “APPGS3MDM32A01.elf” ./ril/src/ril_alarm.o ./ril/src/ril_atResponse.o ./ril/src/ril_audio.o ./ril/src/ril_bluetooth.o ./ril/src/ril_custom.o ./ril/src/ril_dtmf.o ./ril/src/ril_ftp.o ./ril/src/ril_http.o ./ril/src/ril_init.o ./ril/src/ril_location.o ./ril/src/ril_network.o ./ril/src/ril_ntp.o ./ril/src/ril_sim.o ./ril/src/ril_sms.o ./ril/src/ril_system.o ./ril/src/ril_telephony.o ./ril/src/ril_urc.o ./ril/src/ril_util.o ./example/Example_gps_iic.o ./example/example_adc.o ./example/example_alarm.o ./example/example_audio.o ./example/example_bluetooth.o ./example/example_call.o ./example/example_clk.o ./example/example_csd.o ./example/example_download_epo.o ./example/example_dtmf.o ./example/example_eint.o ./example/example_file.o ./example/example_float_math.o ./example/example_fota_ftp.o ./example/example_fota_http.o ./example/example_ftp.o ./example/example_gpio.o ./example/example_http.o ./example/example_iic.o ./example/example_location.o ./example/example_memory.o ./example/example_multitask.o ./example/example_multitask_port.o ./example/example_pwm.o ./example/example_sms.o ./example/example_spi.o ./example/example_system.o ./example/example_tcp_demo.o ./example/example_tcpclient.o ./example/example_tcpserver.o ./example/example_time.o ./example/example_timer.o ./example/example_transpass.o ./example/example_udpclient.o ./example/example_udpserver.o ./example/example_watchdog.o ./example/nema_pro.o ./example/utility.o ./custom/fota/src/fota_ftp.o ./custom/fota/src/fota_http.o ./custom/fota/src/fota_http_code.o ./custom/fota/src/fota_main.o ./custom/config/custom_sys_cfg.o ./custom/config/sys_config.o ./custom/flash.o ./custom/gnss.o ./custom/gpio.o ./custom/gprs.o ./custom/main.o ./custom/sms.o ./custom/socket.o -lapp_start -lm -lc -lcs3 -lgcc
C:\Program Files (x86)\CodeSourcery\Sourcery_CodeBench_Lite_for_ARM_EABI\arm-none-eabi\lib\thumb\libc.a(lib_a-sbrkr.o): In function _sbrk_r': sbrkr.c:(.text+0xc): undefined reference to _sbrk’
collect2.exe: error: ld returned 1 exit status
make: *** [APPGS3MDM32A01.elf] Error 1

I’m getting this error while compiling my code

you use some string function from STD library as sprintf()

for some std function, the application may crash without malloc() free()

void *_sbrk(int incr) { return (void *)-1; }

So what to do now sir

don’t use std or implement malloc() free()

or put this and test
void *_sbrk(int incr) { return (void *)-1; }