This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc driver and -T option
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: 7400 <U7400 at netscape dot net>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 28 Aug 2002 09:41:25 -0400
- Subject: Re: Gcc driver and -T option
- References: <51F6D6B1.71664C7E.0000F094@netscape.net>
On Wed, Aug 28, 2002 at 02:22:59AM -0400, 7400 wrote:
> I would like to know the opinion about following situation related with gcc driver.
>
> - I have a directory under which there are 2 c files say - 1.c and 2.c
> - I compile these file using gcc -o test.exe *.c -Tscript.ld
> - This script.ld uses 1.o and 2.o
>
> Since 1.o and 2.o are NOT created in the cwd the link fails
> I'm aware that driver chooses $TMPDIR to create temporary file and deletes them when linking
> is done
> Temporary files are never created in the current directory Also when temporary files are
> created their names are
> different than that of the .c files . No doubt the linking will fail in the case the
> above as specified object files are not found in current directory Since gcc
> drive is not aware of what obj files are specified in the linker script ( and why it should
> be ? ) it will try to pass the object files in $(TMPDIR)/temporary files with
> generated names to linker (-v option shows the temporary files used )
You should not have to mention 1.o and 2.o by name in your linker
script. Just place the sections you want.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer