This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos 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: compiled result not align to 4 bytes


Frank Lin wrote:
I developed an application, but has problem, I use arm-elf-object -D ??? to got latter result, I find these code compiled from assembly file context.s not aligh to 4 bytes.

My global compiler flags is: mcpu=arm7tdmi -mno-short-load-words -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -gdwarf-2 -g3 -O0 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority

My global linker flags is:
-mcpu=arm7tdmi -mno-short-load-words -Wl,--gc-sections -Wl,-static -gdwarf-2 -g3 -nostdlib

Whether it is caused by gcc bug? To solve this problem, whether I should place .align 4 to every assembly file, or any simple way exists?

Latter disassembly code's right part is my comments.

What version of GCC & BINUTILS are you using?


Note that these come from different source files, so it may be a linker problem.


0c1102a8 <hal_lsbindex>:

0c110345 <hal_thread_switch_context>: <-----------not aligh to 4 bytes


--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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