avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Math symbols missing from AVR libgcc


From: Sean Kauffman
Subject: [avr-gcc-list] Math symbols missing from AVR libgcc
Date: Mon, 23 Mar 2015 20:59:52 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

I have some AVR assembly which was generated for an unknown version of GCC. I can assemble this source into object code, but if I try to link it I am told that it contains undefined symbols.

Specifically, I am missing the following symbols:

__lshrsi3, __ashlsi3,
__divsi3, __divhi3, __divqi3, __modsi3, __modhi3, __modqi3,
__udivsi3, __udivhi3, __udivqi3, __umodsi3, __umodhi3, __umodqi3

These seem to be libgcc symbols, but they are not present in libgcc.a for my version of AVR-GCC (4.8.3). I verified this running nm on those files and there were no symbols with these names defined.

I have been unable to determine in which versions of AVR-GCC these symbols were present, if at all, or if they were provided by another library.

For clarity, here is a trivial example of an assembly file which will assemble without issue but fails linking:


    .text
    .globl  main
    .align  2
    .type   main,@function
main:                                   ; @main
; BB#0:
    ldi r24, 31
    ldi r22, 31
    call    __udivqi3
    ret
.Ltmp1:
    .size   main, .Ltmp1-main

Trying to link this fails with the following error:

/tmp/ccxYMfat.o:udiv.s:9: undefined reference to `__udivqi3'
collect2: error: ld returned 1 exit status

Here's the libgcc I'm using:

$ avr-gcc -print-libgcc-file-name
/usr/lib/gcc/avr/4.8.3/libgcc.a

Which does not contain the symbol __udivqi3

$ avr-nm /usr/lib/gcc/avr/4.8.3/avr6/libgcc.a |grep udivq
$

Does anyone on this list know if these symbols were ever present in AVR GCC? If so in what version? If not, do you know where they are really supposed to be coming from? Are there drop in replacements for them that follow the same calling conventions and do the same things?

I really appreciate any help.

Thanks!
Sean

P.S. Is this is the right list to email, or should I be trying the developers list?

--
address@hidden
UW ID# 20559112
226-789-5447
E5 5046 (previously DC 2550)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]