linker script parsing regression in 2.37
Jan Beulich
jbeulich@suse.com
Thu Jul 22 08:30:16 GMT 2021
Alan,
I suspect it is commit 40726f16a8d7 ("ld script expression parsing")
which broke the Xen hypervisor build. In the linker script we have
.note.gnu.build-id : AT(ADDR(.note.gnu.build-id) - (<expression>)) {
__note_gnu_build_id_start = .;
*(.note.gnu.build-id)
__note_gnu_build_id_end = .;
} :note :text
and I expect it was this hunk
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -385,7 +385,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
yylval.name = xstrdup (yytext + 2);
return LNAME;
}
-<EXPRESSION>{SYMBOLNAMECHAR1}{NOCFILENAMECHAR}* {
+<EXPRESSION>{SYMBOLNAMECHAR1}{SYMBOLNAMECHAR}* {
yylval.name = xstrdup (yytext);
return NAME;
}
which broke accepting '-' in section names.
Since I didn't trust my oldish flex/bison, I simply took 2.36.1's
generated files, re-did the bfd_boolean -> bool conversion, and put
them in the source tree to replace the 2.37 versions. Things are
working fine again this way. (Luckily in this case neither of the
two changes of yours that I've undone this way came with any test
cases, so no testsuite failures resulted either.)
I have to admit that I don't see how we could work around this on
the Xen Project side, so I guess I will want to ask for a 2.37.1
release once this regression got fixed.
Jan
More information about the Binutils
mailing list