[PATCH] D30722: Handle ":" as a regular token character in linker scripts.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 9 01:30:48 PST 2017
grimar added a comment.
This approach sure has simpler implementation,
(when I wrote my patch, I sure thought about doing the same),
but it may open Pandora's box.
For example it is easy to copypaste "global" instead of "local" and it be accepted:
{
global:
aaa;
global: *;
};
At fact any combinations of local and global labels are possible with it:
{
global:
aa;
local:
bb;
global:
cc;
local:
dd;
}
That opens road to writing overcomplicated and what is probably
more important - a road to write scripts that are incompatible with both BFD and gold !
I think compatibility and simplicity is what we want to deliver and if gnu linkers do not
accept that, I see that is a reason also not to accept it.
At fact you want to accept such syntax because its simplifies implementation and
that is understandable position, though I think we probably should not do that here.
https://reviews.llvm.org/D30722
More information about the llvm-commits
mailing list