Issue |
81804
|
Summary |
LLD parser accepts too much in input section wildcard patterns
|
Labels |
bug,
lld:ELF
|
Assignees |
|
Reporter |
mysterymath
|
We ran across an instance of strange parser behavior in LLD; it apparently is willing to accept the following as an input section wildcard:
```
*(SORT_BY_ALIGNMENT(SORT_BY_NAME(.text*)) }
PROVIDE_HIDDEN(__code_end = .)
```
There is a missing parenthesis after `.text*`; there should be three, not two. But LLD doesn't issue a diagnostic; it silently considers the all of the linker script up until the next paren as part of the pattern.
This appears to be considerably more lenient than GNU LD's wildcard pattern:
https://github.com/bminor/binutils-gdb/blob/363baa11378c6383eada19f6bc851fc7230c5dea/ld/ldlex.l#L95
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs