This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ffunction-sections ARM thumb mode


To improve efficiency I decided to enable -function-sections when
compiling newlib for ARM thumb mode with interworking enabled. As a
result I received the following error:

   symbol _start_thumb is in a different section

The following is a diff on the /src/libgloss/arm/linux-crt0.c file to
force the _start_thumb into the .text section:

Index: linux-crt0.c
===================================================================
RCS file: /cvs/src/src/libgloss/arm/linux-crt0.c,v
retrieving revision 1.2
diff -r1.2 linux-crt0.c
24c24,27
< __attribute__((naked, used))
---
> /* Force _start_thumb in the .text section so this will still compile when
>  * enabling -ffunction-sections.
>  */
> __attribute__((naked, used)) __attribute__((section(".text")))

Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]