Skip to contentSkip to conversation

undefined reference to `__gnu_thumb1_case_uqi'

DISCUSSION Ulf Samuelsson 3 participants 3 messages Apr 16, 2011 – May 3, 2011

lore
Share & tools
lore
#0 lore raw

The following code, (part of a bootloader - at91bootstrap-3.0)

"void sub(unsigned char Mode)

{
    switch (Mode) {
    ...
    /* 4 case statements */

"

generates an error when compiling in thumb mode, using the latest OE.

"undefined reference to `__gnu_thumb1_case_uqi'"

I think this subroutine will optimize a switch statment with only a few choices.

Googling for this seems to indicate that __gnu_thumb1_case_uqi is part of libgcc, but hidden.

Switches used: -DCONFIG_THUMB -mthumb -mthumb-interwork

Any clues on fixing this?
Meanwhile I will rewrite the bootloader using if statements

Best Regards
Ulf Samuelsson

#1 lore raw
Quoted 17 lines · Ulf Samuelsson

The following code, (part of a bootloader - at91bootstrap-3.0)

"void sub(unsigned char Mode)

{
    switch (Mode) {
    ...
    /* 4 case statements */

"

generates an error when compiling in thumb mode, using the latest OE.

"undefined reference to `__gnu_thumb1_case_uqi'"

I think this subroutine will optimize a switch statment with only a few choices.

Quoted 7 lines

Googling for this seems to indicate that __gnu_thumb1_case_uqi is part of libgcc, but hidden.

Switches used: -DCONFIG_THUMB -mthumb -mthumb-interwork

Any clues on fixing this?
Meanwhile I will rewrite the bootloader using if statements

Does adding -ffreestanding help?

Regards,
Andreas

#2 lore raw
In reply to Ulf Samuelsson
Quoted 17 lines · Ulf Samuelsson

The following code, (part of a bootloader - at91bootstrap-3.0)

"void sub(unsigned char Mode)

{
    switch (Mode) {
    ...
    /* 4 case statements */

"

generates an error when compiling in thumb mode, using the latest OE.

"undefined reference to `__gnu_thumb1_case_uqi'"

I think this subroutine will optimize a switch statment with only a few choices.

Quoted 6 lines

Googling for this seems to indicate that __gnu_thumb1_case_uqi is part of libgcc, but hidden.

Switches used: -DCONFIG_THUMB -mthumb -mthumb-interwork

Any clues on fixing this?

what is your linker command ? Are you using gcc to do the linking or calling out ld explicitly.

Quoted 10 lines

Meanwhile I will rewrite the bootloader using if statements

Best Regards
Ulf Samuelsson

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
-Khem