Different behavior when linking with gcc and ld: Unable to link __aeabi_uldivmod when link with arm-none-eabi-ld
When I tried to link source code with:
arm-none-eabi-ld -T linker.ld $(OBJECT_FILES) -L $(LIB_PATH) -lm -lc
There is error that "undefined reference to `__aeabi_uldivmod ' ". This project will build successfully when I tried to remove the instruction which required this API.
I also be able to link the same object file with arm-none-eabi-gcc:
arm-none-eabi-gcc -nostartfiles -T$(LINKER_FILE) -Os -g -Wall -mcpu=cortex-r7 -mthumb -mfpu=vfpv4 -mfloat-abi=hard -L $(LIB_DIRS) -lm -lc
It event work without needed for -L and -l (however I need them for additional math library).
So my question are:
1. What is the different between these 2 approaches? Why it did not work with LD version?
2. Is there any drawback when I link project use GCC command?
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Thong Dam for more information if necessary.