avr-libc-dev
[Top][All Lists]
Advanced

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

Re: [avr-libc-dev] [RFC] Put avr-libc functions in unique section


From: Dmitry K.
Subject: Re: [avr-libc-dev] [RFC] Put avr-libc functions in unique section
Date: Wed, 1 Apr 2009 16:23:25 +1100
User-agent: KMail/1.5

On Wednesday 01 April 2009 03:36, Weddington, Eric wrote:
[...]
> So, I still stick with the patch, unless someone can show me that it is an
> easier patch to do it the other way.

Note, the patching of Avr-libc is not sufficient.
The 'libgcc.a' contains 2 names: '.text.libgcc' and '.text'.

The example below illustrates the renaming after
installing the standart avr toolset "as is".

Regards,
Dmitry.

# Original set of libs.
LIBS="$GCCDIR/avr/lib/lib*.a \
      $GCCDIR/lib/gcc/avr/4.1.2/lib*.a"

for oldlib in $LIBS ; do
  newlib=`basename $oldlib`
  rm -f $newlib
  case $newlib in
    libg*)   renames=".text=.text.libgcc.gcc" ;;
    libm.a)  renames=".text.fplib=.text.avr-libc.fplib \
                      .text=.text.avr-libc" ;;
    *)       renames=".text.ctype=.text.avr-libc.ctype \
                      .text.fplib=.text.avr-libc.fplib \
                      .text=.text.avr-libc" ;;
  esac
  for obj in `avr-ar -t $oldlib` ; do
    avr-ar x $oldlib $obj
    for s in $renames ; do
      avr-objcopy --rename-section $s $obj
    done
    avr-ar rc $newlib $obj
    rm $obj
  done
done





reply via email to

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