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]

Re: [PATCH ARM/THUMB] replace mov with movs in crt0.S


On 11/23/11 20:41, Richard Earnshaw wrote:
On 23 Nov 2011, at 19:24, "Thomas Klein"<th.r.klein@web.de> wrote:

On 11/23/11 18:18, Richard Earnshaw wrote:
On 23/11/11 18:24, Thomas Klein wrote:

The ARM7TDMI machine usually starting with a crt0 in ARM similar the one
in arm-elf-eabi/newlib.
The Cortex-M3 machine starts with a THUMB2 crt0 similare the one in
arm-elf-eabi/thumb/thumb2/newlib
When running a test thumb program in arm-sim the crt0 of
arm-elf-eabi/thumb/newlib is used.
And at least with this I have had the problem.
The simulator did not like the MOV lo, lo.
Using MOVS lo, lo instead helps.

So can you send me the output of

readelf -A crt0.o

For the object file that you think is incorrectly built please.

If this problem is been created by myself. Since usually no
THUMB/Interwork crt0 would be created
and only a ARM or THUMB2 crt0 would exist.
Then I have to say sorry for the trouble I made.
I'm not trying to suggest that, I'm just trying to understand what's
going on here.  It looks to me as though the permutation you're using
should be using legacy syntax and I don't, yet, understand why you are
seeing the problem you are reporting.

R.


Oops, this is not what I was expected to see.
I thought to see v4t with thumb1 and not v6t2 with thumb2.
My solutions might be to simple, and not correct.


File: ./arm-elf-eabi/thumb/newlib/crt0.o
Attribute Section: aeabi
File Attributes
   Tag_CPU_arch: v6T2
   Tag_ARM_ISA_use: Yes
   Tag_THUMB_ISA_use: Thumb-2
   Tag_DIV_use: Not allowed

Ok, can you send me the output of gcc -dM -E for this one (IIRC this should give you a list of pre processor defines). No need to do the others, as I suspect that they will be following a similar pattern.

R.



Attaching output of:
arm-elf-eabi-gcc -dM -E -B/usr/home/thomas/work/build/env_newlib/arm-elf-eabi/thumb/newlib/ -isystem /usr/home/thomas/work/build/env_newlib/arm-elf-eabi/thumb/newlib/targ-include -isystem /usr/home/thomas/work/env/src/newlib/libc/include -L/usr/home/thomas/work/build/env_newlib/./ld -mthumb -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"1.19.0\" -DPACKAGE_STRING=\"newlib\ 1.19.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../../../../../../env/src/newlib/libc/sys/arm -Os -DARM_RDI_MONITOR -fno-builtin -Os -DARM_RDI_MONITOR -fno-builtin -g -Os -mthumb -o crt0.defines ../../../../../../../../env/src/newlib/libc/sys/arm/crt0.S



Regards Thomas

Attachment: crt0.defines
Description: Text document


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