replacing the default linker script

Alan Modra amodra@gmail.com
Thu Mar 7 00:37:00 GMT 2013


On Wed, Mar 06, 2013 at 11:30:57AM -0800, Ian Lance Taylor wrote:
> On Wed, Mar 6, 2013 at 10:52 AM, Trevor Woerner <twoerner@gmail.com> wrote:
> > I was hoping that if I replaced one of them with my script that the
> > new script would get used by default. But that doesn't seem to be the
> > case.
> 
> No, it doesn't work that way.  The default script is compiled into the
> linker so that it doesn't have to waste time opening a file.  The
> presence of the default scripts in the file system is, essentially,
> documentation.

Yes, scripts are mostly compiled in, but grep for COMPILE_IN.  With a
little work it should be possible to disable compiled in scripts.
You'd need to change ld/genscripts.sh to not set the var for native
targets if it is already set, and put "COMPILE_IN=" in your emulparams
file.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list