[PATCH] gas: fix bogus error on .org involving expression
Jan Beulich
jbeulich@suse.com
Tue Jun 28 07:13:31 GMT 2022
On 28.06.2022 05:15, Alan Modra wrote:
> This is just speculation but I wonder if we could just drop
> expr_section, and use undefined_section in places where we currently
> create expression symbols? Conceptually, is there any real difference
> between an expression that we can't resolve just yet, and the simplest
> case of such an expression, an undefined symbol that is a forward
> reference?
Hmm, that's an interesting thought. There are a couple of places where
symbols are explicitly put in expr_section (cgen.c, dwarf2dbg.c,
read.c, tc-avr.c). I also see a possible problem with expression
resolution: A result there may want expressing to live outside of any
"real" section while at the same time also not being undefined. (In
fact that's what part of the patch here arranges for, to make those
cases actually distinguishable.) But it may well be that this is a
theoretical concern only, while really we may have no code which would
actually care.
I can try to find time to actually experiment along these lines, but
some of the mentioned uses don't look very clear how to deal with.
Nor does e.g. do_org() permitting expr_section but forbidding
undefined_section.
Jan
More information about the Binutils
mailing list