EmbeddedRelated.com
Forums
Memfault Beyond the Launch

GCC warning message

Started by Octavius November 27, 2006
Hi All,

Have anyone encounter the warning message
as shown below (Using GCC compiler):

arm-thumb-elf/bin/ld:
Warning: alignment 4 of symbol "Counter" in .\obj\timer.o
is smaller than 32 in .\obj\user.o

Could you advise me what does the above mean?

By the way, are there any documentation for GCC's Warning or error
messages?

Thank you very much for spending time reading this message. :)

Best regards,
Octavius

An Engineer's Guide to the LPC2100 Series

I've not used GCC for donkeys years however if I were to guess given your
information I'd imagine it's possibly down to alignment 4 trying to ensure
that symbol Counter is on a 4 byte boundary and that in user.c it's
definition doesn't match - eg its re-defined short etc.
I'm sure there'll be someone on here though that's far more at home with GCC
that can give a better answer.

Andy

-----Original Message-----
From: l... [mailto:l...]On Behalf Of
Octavius
Sent: 27 November 2006 07:30
To: l...
Subject: [lpc2000] GCC warning message
Hi All,

Have anyone encounter the warning message
as shown below (Using GCC compiler):

arm-thumb-elf/bin/ld:
Warning: alignment 4 of symbol "Counter" in .\obj\timer.o
is smaller than 32 in .\obj\user.o

Could you advise me what does the above mean?

By the way, are there any documentation for GCC's Warning or error
messages?

Thank you very much for spending time reading this message. :)

Best regards,
Octavius
Hi Andy,

Thank you very much for your reply.

With the clue from u, the warning message was gone,
after using "extern" declaration for the symbol Counter.

Best regards,
Octavius

--- In l..., "Andrew Berney" wrote:
>
> I've not used GCC for donkeys years however if I were to guess given
your
> information I'd imagine it's possibly down to alignment 4 trying to
ensure
> that symbol Counter is on a 4 byte boundary and that in user.c it's
> definition doesn't match - eg its re-defined short etc.
> I'm sure there'll be someone on here though that's far more at home
with GCC
> that can give a better answer.
>
> Andy
>
> -----Original Message-----
> From: l... [mailto:l...]On
Behalf Of
> Octavius
> Sent: 27 November 2006 07:30
> To: l...
> Subject: [lpc2000] GCC warning message
> Hi All,
>
> Have anyone encounter the warning message
> as shown below (Using GCC compiler):
>
> arm-thumb-elf/bin/ld:
> Warning: alignment 4 of symbol "Counter" in .\obj\timer.o
> is smaller than 32 in .\obj\user.o
>
> Could you advise me what does the above mean?
>
> By the way, are there any documentation for GCC's Warning or error
> messages?
>
> Thank you very much for spending time reading this message. :)
>

Memfault Beyond the Launch