Remove all dependencies on linker script symbols #4

Open
opened 3 years ago by PlaneteCasio · 0 comments
Owner

If a project is build without the gcc flag -nostdlib, it links against stack_k, end_k and .eh_frame

If not provided, the following errors appear:

ld: .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crt1.o: in function `stack_k':
(.text+0x50): undefined reference to `_stack'
ld: .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crt1.o: in function `end_k':
(.text+0x58): undefined reference to `_end'
`.eh_frame' referenced in section `.text' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o: defined in discarded section `.eh_frame' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o
`.eh_frame' referenced in section `.text' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o: defined in discarded section `.eh_frame' of /home/johannes/dev-projects/Casio_SDK/sh3eb-elf/sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o

This will probably resolved as soon as a proper crt0.s is provided. All other startup routines have to be removed.

If a project is build **without** the gcc flag `-nostdlib`, it links against `stack_k`, `end_k` and `.eh_frame` If not provided, the following errors appear: ``` ld: .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crt1.o: in function `stack_k': (.text+0x50): undefined reference to `_stack' ld: .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crt1.o: in function `end_k': (.text+0x58): undefined reference to `_end' `.eh_frame' referenced in section `.text' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o: defined in discarded section `.eh_frame' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o `.eh_frame' referenced in section `.text' of .../sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o: defined in discarded section `.eh_frame' of /home/johannes/dev-projects/Casio_SDK/sh3eb-elf/sh3eb-elf/lib/gcc/sh3eb-elf/8.1.0/crtbegin.o ``` This will probably resolved as soon as a proper crt0.s is provided. All other startup routines have to be removed.
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: PlaneteCasio/libc#4
Loading…
There is no content yet.