Menu

#134 [devkitARM] Windows shenanigans when passing -L to ld

user_error
open
nobody
1
2018-01-21
2018-01-21
No

Invocation:
${DEVKITARM}/bin/arm-none-eabi-ld -L path/to/library -T ld_script.ld -o foo.elf src/foo.o asm/crt0.s -lgcc -lc

Example line from ld_script.ld:
path/to/library/libc.a:memcpy.o(.text);

Result on OSX and Linux: ELF builds without error

Result on Windows (cygwin):

`memcpy' referenced in section `.text' of src/foo.o: defined in discarded section `.text' of path/to/library\libc.a(memcpy.o)

For whatever reason, ld appends an NT-style forward slash to the -L path even when the rest of the path exclusively uses backslashes. It is then unable to equate the resulting mixed path syntax with any equivalent path in the linker script.

Discussion


Log in to post a comment.