default linker script in ld

Ian Lance Taylor iant@google.com
Tue Mar 16 15:01:00 GMT 2010


Alan Nilsson <alan.n@mac.com> writes:

> Is there a way to build/config ld to use a custom script for the
> 'default' linker script?

Well, yes, you can edit the linker sources.  It's a little
complicated, as the default linker script is generated.  See the files
in ld/scripttempl.  The linker script template is selected by the
SCRIPT_NAME variable in the emulparams file.  The emulparams file is
selected by the targ_emul variable in ld/configure.tgt.

> I want to setup ld so I do not have to use the -T option since all
> my builds require a custom script.

I would just use a shell script to compile code.

Ian



More information about the Gcc-help mailing list