This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

replacing the default link-edit script


Hi,

Let's say I'm building a toolchain that I expect to only be used to
generate binaries for a given, specific, embedded board which isn't
running Linux. Each time I use my cross-compiler to build my code I
need to specify a "-T script.ld" option since the default script which
is built into my cross-ld isn't going to be correct (it's going to
assume a Linux environment).

>From what I can tell, unfortunately, this default Linux-based linker
script is generated at build time, included in the source code, and
built into the cross-ld application itself (I think it's called
armelf.x, or something like that in the case when building a
cross-compiler targeting an ARM processor).

Does anyone know if there is a way to change this armelf.x script that
is built into the cross-ld during the compile? Is there an elegant way
to say "use this instead"? Failing that, is there a way to  set things
up so that every time the cross-ld is called, it includes my "-T
script.ld" option by default?

I guess one thing I could do is replace the cross-ld that would be
found in the PATH with a wrapper script that calls the cross-ld with
the "-T" option already setup. That's not a bad solution, but I was
hoping for a better one, preferably the one where my script can become
the built-in one.

Best regards,
    Trevor

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]