[Top][All Lists]

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

Re: [avr-gcc-list] -fPIC/-fpic

From: Tyler Hall
Subject: Re: [avr-gcc-list] -fPIC/-fpic
Date: Fri, 18 Apr 2003 23:47:12 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20021216

To help keep the bootstrap code from changing, you may want to keep it as a separate source file, then maybe even tweak your Makefile so it gets built as a separate target, which also becomes a dependant for the app code:

bootstrap : bootstrap.o
bootstrap.o : bootstrap.c bootstrap.h
app : $(APPOBJS) bootstrap.o

And just treat bootstrap.o as your "shared library", use it explicitly during the linking stage of your app. If you maintain the bootstrap separately from your app code (which it really should be since it has it's own starting point address) then it only gets recompiled if you happen to change the dependant source files.


Joerg Wunsch wrote:
address@hidden wrote:

Sounds cool, I'll do that! Thanks! BTW isn't there any chance that
the "unchanged" (bootstrap) code will be changed by the compiler
somehow? I mean is the same source compiled every time to the SAME
binary format if I use the same switches?  (using -Os

It ought to create the same code, given identical circumstances.

You probably need to be careful with global/static variables though.


reply via email to

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