[PATCH] Document that most directives are case insensitive

Ciro Santilli ciro.santilli@gmail.com
Wed Jun 24 10:44:00 GMT 2015


True, that should be fixed as well.

I propose we just remove that piece of information since:

- it does not matter much as users have to pick from one in the list
- the rule is not so simple and depends on the target because of the
LEX_ macros inside the read.c:lex_type array which is used by
get_symbol_end from
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gas/read.c;h=816c255bf265d7cb3a17fc0cfd850eaa90dc8f71;hb=HEAD#l912

If you think we should keep it, we should just link to symbol name
rules as they are the same:
https://sourceware.org/binutils/docs-2.25/as/Symbol-Names.html#Symbol-Names

>From the code I think `.` is also accepted in the middle of label
identifiers (3 in lex_type), so I think the current Symbol Names doc
is not correct as well:

> That character may be followed by any string of digits, letters, dollar signs (unless otherwise noted for a particular target machine), and underscores.

>From 052ebb714e141e6df52e6a942ee353aa522b2f07 Mon Sep 17 00:00:00 2001
From: Ciro Santilli <ciro.santilli@gmail.com>
Date: Tue, 23 Jun 2015 10:06:42 +0200
Subject: [PATCH] Document that most directives are case insensitive

---
 gas/doc/as.texinfo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
index 6694b23..6b5b6f1 100644
--- a/gas/doc/as.texinfo
+++ b/gas/doc/as.texinfo
@@ -4205,7 +4205,7 @@ address; you can only have a defined section in
one of the two arguments.
 @cindex pseudo-ops, machine independent
 @cindex machine independent directives
 All assembler directives have names that begin with a period (@samp{.}).
-The rest of the name is letters, usually in lower case.
+The names are case insensitive for most targets, and usually written
in lower case.

 This chapter discusses directives that are available regardless of the
 target machine configuration for the @sc{gnu} assembler.
-- 
1.9.1

On Tue, Jun 23, 2015 at 10:44 AM, Andreas Schwab <schwab@suse.de> wrote:
> Ciro Santilli <ciro.santilli@gmail.com> writes:
>
>> I saw a `.SECTION` directive written in uppercase, and I was in doubt
>> if it should work.
>>
>> After reading `read.c`, I think this is the case, because of the
>> TOLOWER inside `#ifned TC_CASE_SENSITIVE`. `TC_CASE_SENSITIVE` is only
>> set for metag.
>>
>> ---
>>  gas/doc/as.texinfo | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/gas/doc/as.texinfo b/gas/doc/as.texinfo
>> index 6694b23..7770912 100644
>> --- a/gas/doc/as.texinfo
>> +++ b/gas/doc/as.texinfo
>> @@ -4205,7 +4205,8 @@ address; you can only have a defined section in
>> one of the two arguments.
>>  @cindex pseudo-ops, machine independent
>>  @cindex machine independent directives
>>  All assembler directives have names that begin with a period (@samp{.}).
>> -The rest of the name is letters, usually in lower case.
>> +The rest of the name is made of letters.
>
> They can also contain digits and underscores.  Basically they follow the
> syntax of identifiers.
>
> Andreas.
>
> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."



More information about the Binutils mailing list