public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Question: default linker scripts and emulations
@ 2023-12-06 10:30 Georg-Johann Lay
  2023-12-06 11:21 ` Nick Clifton
  0 siblings, 1 reply; 7+ messages in thread
From: Georg-Johann Lay @ 2023-12-06 10:30 UTC (permalink / raw)
  To: binutils

GCC could generate better code for some devices if it could use an
adjusted linker description file for these devices.

Is it possible to add a new option to the linker so it picks a different
ld script, such that:

o The same emulation is used.

o All works a usual, e.g. when the user request -T myscript.ld, use
myscript.ld provided it is a complete ld script and not just INSERT AFTER etc.

In the case a new emulation is required:

The compiler has currently around 60 multilib variants, and a new emulation
would add yet another 6 multilibs. Therefore, it would be desirable to
re-use the old multilib (which still has some devices in it).

Say the old machine is avr:102 and the new one is avr:108, but the generated
code is all the same, only difference is ld script. The compiler would
map avr:108 to avr:102 multilibs.

What's the best way to implement this in Binutils?

Is it enough to tell that the two machines / emulations are compatible
in bfd_arch_info_type.compatible() ?  Or maybe a smarter approach?

Thanks in advance

Johann



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-12-08 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 10:30 Question: default linker scripts and emulations Georg-Johann Lay
2023-12-06 11:21 ` Nick Clifton
2023-12-06 16:44   ` Georg-Johann Lay
2023-12-07 15:50     ` Nick Clifton
2023-12-07 18:29       ` Georg-Johann Lay
2023-12-08 11:29         ` Nick Clifton
2023-12-08 16:04           ` Georg-Johann Lay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).