[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Linker search directories
From: |
Bryce Denney |
Subject: |
Re: [avr-gcc-list] Linker search directories |
Date: |
Mon, 28 Oct 2002 09:59:05 -0500 (EST) |
On Mon, 28 Oct 2002, Joerg Wunsch wrote:
> > Does avr-ld have any built-in search paths for libraries?
>
> Yes, it does.
>
> > Is there a command to print them out?
>
> Not that i know of.
GNU ld has a --verbose option that helps you to determine where it is
searching and what it is linking in. If you are running ld directly, you
just add --verbose of course. If gcc is running ld for you, which is more
common, then you can add "-Wl,--verbose" to ask gcc to pass the option to
the linker.
Example:
$ avr-gcc -mmcu=atmega163 -Os -I. -I../avrlib pwm1.c \
-o pwm1.elf -Wl,--verbose
GNU ld version 2.11 (with BFD 2.11)
Supported emulations:
avr85xx
avr1200
avr23xx
avr44x4
avr4433
avrmega603
avrmega103
avrmega161
cannot find script file ldscripts/avrmega161.x
cannot find script file
/usr/local/lib/gcc-lib/avr/3.0/avr5/ldscripts/avrmega161.x
cannot find script file
/usr/local/lib/gcc-lib/avr/3.0/ldscripts/avrmega161.x
cannot find script file
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/avr5/ldscripts/avrmega161.x
opened script file
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/ldscripts/avrmega161.x
attempt to open
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/avr5/crtm163.o
succeeded
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/avr5/crtm163.o
attempt to open /tmp/ccmIFpVs.o succeeded
/tmp/ccmIFpVs.o
attempt to open /usr/local/lib/gcc-lib/avr/3.0/avr5/libgcc.a succeeded
attempt to open /usr/local/lib/gcc-lib/avr/3.0/avr5/libc.a failed
attempt to open /usr/local/lib/gcc-lib/avr/3.0/libc.a failed
attempt to open
/usr/local/lib/gcc-lib/avr/3.0/../../../../avr/lib/avr5/libc.a succeeded
attempt to open /usr/local/lib/gcc-lib/avr/3.0/avr5/libgcc.a succeeded
It's a little hard to interpret the output in the email here because of
line wraps. But it looks like it actually used these files:
- /usr/local/avr/lib/ldscripts/avrmega161.x
- /usr/local/avr/lib/avr5/crtm163.o
- /tmp/ccmIFpVs.o (must be the one it just compiled)
- /usr/local/lib/gcc-lib/avr/3.0/avr5/libgcc.a
- /usr/local/avr/lib/avr5/libc.a
- /usr/local/lib/gcc-lib/avr/3.0/avr5/libgcc.a
Good luck,
Bryce
avr-gcc-list at http://avr1.org