This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: STARTUP linker script option
- From: Alan Modra <amodra at gmail dot com>
- To: Matthew Stock <stock at csgeeks dot org>
- Cc: binutils at sourceware dot org
- Date: Wed, 21 Nov 2018 21:43:34 +1030
- Subject: Re: STARTUP linker script option
- References: <CAJEih4_28guGv1LnpwhudRD-BeSj2hjft9X3vac=BYqZqTW4iw@mail.gmail.com>
On Wed, Nov 21, 2018 at 12:09:28AM -0500, Matthew Stock wrote:
> Hi all,
>
> I'm new to the mailing list, but I've been tinkering in a fork of the code
> for the past few years. My fundamental question is pretty simple: is the
> STARTUP() linker script option deprecated? It seems to do nothing.
>
> After looking at the code in ld/ldlang.c, it seems like the filename that
> is provided in STARTUP() is stored in first_file, but that variable appears
> to be both static to the file and never referenced. Looking back in the
> archive, it seems like it's been that way for at least the past decade, so
> what am I missing?
lang_init creates an entry of header.type lang_input_statement_enum on
the linker's statement list, with flags.real not set. first_file
points at that dummy statement. That statement is modified to real by
lang_startup, so it should be processed in open_input_bfds.
--
Alan Modra
Australia Development Lab, IBM