[PATCH] D76328: [ELF] Allow uppercase section directives

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 18 03:46:15 PDT 2020


grimar added a comment.

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'

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.


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