[PATCH] D76328: [ELF] Allow uppercase section directives
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 18 06:30:50 PDT 2020
sidneym added a comment.
In D76328#1928559 <https://reviews.llvm.org/D76328#1928559>, @grimar wrote:
> Seems I do not understand the current behavior.
>
> GNU as shows the following errors for this test:
>
> test.s:6: Error: unknown pseudo-op: `.data.rel.ro'
> test.s:9: Error: unknown pseudo-op: `.data.rel'
> test.s:12: Error: unknown pseudo-op: `.eh_frame'
> test.s:15: Error: unknown pseudo-op: `.rodata'
> test.s:18: Error: unknown pseudo-op: `.tbss'
> test.s:21: Error: unknown pseudo-op: `.tdata'
> test.s:27: Error: unknown pseudo-op: `.data.rel.ro'
> test.s:30: Error: unknown pseudo-op: `.data.rel'
> test.s:33: Error: unknown pseudo-op: `.eh_frame'
> test.s:36: Error: unknown pseudo-op: `.rodata'
> test.s:39: Error: unknown pseudo-op: `.tbss'
> test.s:42: Error: unknown pseudo-op: `.tdata'
I think GNU might want a leading .section.
> Looking at the documentation of directives allowed (https://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops)
> It says: "The names are case insensitive for most targets, and usually written in lower case."
> But it mentions only `Data` and `Text` directives. Though we do not check them in this test (but we support them).
>
> So seems we are already different here. But does it make sence to support upper-case? I do not know.
> Perhaps it is OK for the compatibility (with the spec), but seems we have no users, so probably we shouldn't?
> I'd like to hear what other think.
That is fair, I ran accross some code that was all uppercase and the .TEXT section was actually the error that surfaced. I will update the testcase to include all of the ops if we want to add this patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76328/new/
https://reviews.llvm.org/D76328
More information about the llvm-commits
mailing list