Re: #define STARTFILE_SPEC such that crt0.o is used only when crt1.o does not exist

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

 



On Sat, Apr 4, 2020 at 11:04 AM William Tambe via Gcc-help
<gcc-help@xxxxxxxxxxx> wrote:
> Is there a way to #define STARTFILE_SPEC such that crt0.o is used only
> when crt1.o does not exist ?

Looks like an odd question.  Normally a C library should only provide
one of the files, though different C libraries may use a different
name, e.g. it is common for an X-elf target to have a crt0.o file and
a X-linux target to have crt1.o, but those are different target
triplets.  If you have a single target with both crt0.o and crt1.o
then you may need to add a -m option to choose which one to use.  Some
targets do this, like nds and microblaze, where the different crtNUM.o
files provide slightly different feature sets.  Or another option is
to provide a specs file in libgloss that sets the startfile spec
correctly for the hardware target, and then the user is expected to
provide a --specs=X option to choose the right specs file for the
hardware target.  This probably only makes sense if the multiple
crtNUM.o files are in libgloss.

Jim



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux