Senthil Kumar Selvaraj schrieb:
Georg-Johann Lay writes:
Senthil Kumar Selvaraj schrieb:
Senthil Kumar Selvaraj writes:
Georg-Johann Lay writes:
Senthil Kumar Selvaraj schrieb:
Hi,
[set JUMP_TABLES_IN_TEXT_SECTION to 1]
I added tests that use linker relaxation and discovered a relaxation bug
in binutils 2.26 (and later) that messes up symbol values in the
presence of alignment directives. I'm working on that right now -
hopefully, it'll get backported to the release branch.
Once that gets upstream, I'll resend the patch - with more tests, and
incorporating your comments.
There were two binutils bugs (PR ld/20221 and ld/20254) that were
blocking this patch - on enabling, relaxation, jumptables were
getting corrupted. Both of the issues are now fixed, and the fixes
are in master and 2.26 branch.
Should we mention in the release notes that Binutils >= 2.26 is needed
for avr-gcc >= 6 ?
Yes, we should document it. binutils 2.25 would probably work too, as
the bugs were introduced only in binutils 2.26. I'll check and send a patch.
Maybe even check during configure whether an appropriate version of
Binutils is used?
That would be nice, but is it ok to add target specific conditions to
configure.ac?
We already have avr-specific tests in gcc/configure.ac which test
whether -mrmw and --mlink-relax are supported by as or not. This is
then used in gen-avr-mmcu-specs.c:
#ifdef HAVE_AS_AVR_MLINK_RELAX_OPTION
fprintf (f, "*asm_relax:\n\t%s\n\n", ASM_RELAX_SPEC);
#endif // have avr-as --mlink-relax
#ifdef HAVE_AS_AVR_MRMW_OPTION
fprintf (f, "*asm_rmw:\n%s\n\n", rmw
? "\t%{!mno-rmw: -mrmw}"
: "\t%{mrmw}");
#endif // have avr-as -mrmw
Johann