Remove all dependencies on linker script symbols #4

Open
opened 2019-06-12 00:39:27 +02:00 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
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: PlaneteCasio/libc#4
No description provided.